* looking for address@hidden/g-wrap--mainline--1.9.0--patch-5 to compare with * comparing to address@hidden/g-wrap--mainline--1.9.0--patch-5 M guile/g-wrap/guile-runtime.c M guile/g-wrap/guile-runtime.h * modified files --- orig/guile/g-wrap/guile-runtime.c +++ mod/guile/g-wrap/guile-runtime.c @@ -54,8 +54,6 @@ static SCM module_add_x = SCM_UNSPECIFIED; static SCM scm_sym_make = SCM_UNSPECIFIED; -static SCM latent_variables_hash_hash = SCM_BOOL_F; - static SCM latent_generics_hash = SCM_BOOL_F; static SCM old_binder_proc = SCM_BOOL_F; @@ -68,7 +66,7 @@ static SCM sym_args = SCM_UNSPECIFIED; static scm_t_bits dynproc_smob_tag = 0; -#if 0 // not useed ATM +#if 0 // not used ATM void gw_guile_runtime_get_version_info(int *major, int *revision, int *age) { @@ -172,62 +170,6 @@ return SCM_BOOL_F; } -static SCM -gw_user_module_binder_proc (SCM module, SCM sym, SCM definep) -{ - SCM latent_variables_hash, pair, val, var; - - latent_variables_hash = - scm_hashq_ref (latent_variables_hash_hash, module, SCM_BOOL_F); - if (SCM_FALSEP (latent_variables_hash)) - abort (); - - pair = scm_hashq_ref (latent_variables_hash, sym, SCM_BOOL_F); - if (SCM_FALSEP (pair)) - return SCM_BOOL_F; - - val = scm_call_1 (SCM_CAR (pair), SCM_CDR (pair)); - var = scm_make_variable (val); - scm_call_3 (module_add_x, module, sym, var); - return var; -} - -void -gw_guile_make_latent_variable (SCM sym, SCM proc, SCM arg) -{ - SCM latent_variables_hash; - SCM module = scm_current_module (); - - /* Unlike generics, variables are hashed per-module. */ - if (SCM_FALSEP (latent_variables_hash_hash)) - latent_variables_hash_hash = scm_permanent_object ( - scm_c_make_hash_table (31)); - - latent_variables_hash = - scm_hashq_ref (latent_variables_hash_hash, module, SCM_BOOL_F); - if (SCM_FALSEP (latent_variables_hash)) - { - latent_variables_hash = scm_c_make_hash_table (31); - scm_hashq_create_handle_x (latent_variables_hash_hash, module, - latent_variables_hash); - /* Also need to hack the module: */ - if (SCM_FALSEP (SCM_MODULE_BINDER (module))) - scm_struct_set_x (module, SCM_MAKINUM (scm_module_index_binder), - scm_c_make_gsubr ("%gw-user-module-binder", 3, 0, 0, - gw_user_module_binder_proc)); - } - - if (SCM_NFALSEP (scm_hashq_ref (latent_variables_hash, sym, SCM_BOOL_F))) - { - gw_raise_error (NULL, "Latent var already registered: %s", - SCM_SYMBOL_CHARS (sym)); - return; - } - - scm_hashq_create_handle_x (latent_variables_hash, sym, - scm_cons (proc, arg)); -} - /* 1. methods of generic functions can come from any module. * eg gst_props_entry_get and g_object_get. * --- orig/guile/g-wrap/guile-runtime.h +++ mod/guile/g-wrap/guile-runtime.h @@ -42,7 +42,6 @@ SCM scm_show_all_p); SCM gw_guile_enum_val2int(GWEnumPair enum_pairs[], SCM scm_val); -void gw_guile_make_latent_variable (SCM sym, SCM proc, SCM arg); void gw_guile_procedure_to_method_public (SCM proc, SCM class_name, SCM generic_name, SCM n_req_args, SCM use_optional_args);