Comment 4 for bug 1782306

Revision history for this message
Roland Lutz (rlutz) wrote : Re: Please migrate to Guile 2.2

The function ‘scm_frame_procedure_name’ conceptually replaces ‘scm_frame_procedure’, but there's an important difference: the former returns the name of the procedure while the latter returns the procedure itself.

In order to create a Guile representation of a Python function, the Python <-> Guile interface code creates a Guile gsubr and keeps an association between the Guile gsubr and the Python function. When the gsubr is called later, the interface code looks up the matching Python function and calls it. See py2scm.c (search for ‘gsubr_alist’):

https://github.com/rlutz/geda-gaf/blob/1.10.0-20191008/xorn/src/cpython/guile/py2scm.c#L62

This only works if ‘call_callable’ can determine which gsubr object it has been called as.

It may be possible to work around the problem by using unique function names, but that feels like an ugly hack; so staying with Guile 2.0 appears to be the best option right now.