[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA: Guile problem



Hi Carlos,

Carlos Nieves Ónega writes:
 > [...]
 > In g_netlist.c, the call:
 >     slots_list = scm_sort_list_x(slots_list,
 >                                  scm_c_module_lookup (
 >                                    scm_current_module (), "<"));
 > produces the error:
 > ERROR: In procedure apply:
 > ERROR: Wrong type argument in position 1: #<variable 8059240 binding:
 > #<primitive-procedure <=>>
 > 
 > I'm not a guile expert, but I guess that scm_c_module_lookup can't find
 > the < function. Anyone has any idea of how to fix this?

If successful, scm_c_module_lookup() returns a variable object that
has to be dereferenced to actually become the procedure to be passed
to scm_sort_list_x().

The line should be:
 slots_list = scm_sort_list_x(slots_list,
   SCM_VARIABLE_REF (scm_c_module_lookup (scm_current_module (), "<")));

Modifying like that the two uses of scm_c_module_lookup() in
g_netlist.c fixes the problem for me. Feel free to commit the fix.


Patrick