Skip to content

Commit a0805f7

Browse files
committed
Fix double conversion of Scheme procedures.
The `procedure->PyObject*/function` procedure already converts its argumetn (`proc`) into a `SchemeObject`. We must not do it again in `python-SchemeProcedure`.
1 parent 3a8456b commit a0805f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python.scm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3052,10 +3052,12 @@ end-of-c-declare
30523052
(define python-exec
30533053
(sfpc-send-recv (get-scheme-fpc-state!) (vector op-get-exec)))
30543054

3055+
;; Create a _SchemeProcedure instance.
3056+
;; obj is a SchemeObject that contains a pointer to a Scheme function.
30553057
(define python-SchemeProcedure
30563058
(let ((_SchemeProcedure (python-eval "foreign(_SchemeProcedure)")))
30573059
(lambda (obj)
3058-
(PyObject_CallFunctionObjArgs1 _SchemeProcedure (object->SchemeObject obj)))))
3060+
(PyObject_CallFunctionObjArgs1 _SchemeProcedure obj))))
30593061

30603062
((python-eval "__import__('sys').path.append")
30613063
(path-expand "site-packages" python-venv-lib-dir))

0 commit comments

Comments
 (0)