From 2a47ed96d2a6faba566a676f7419e6db4fae12d6 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 24 Nov 2008 03:14:55 +0000 Subject: [PATCH] Reflect the results of calling bjam from Python. (fixes #2112) [SVN r49907] --- historic/jam/src/builtins.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/historic/jam/src/builtins.c b/historic/jam/src/builtins.c index e17db3f7a..9e12d7a14 100644 --- a/historic/jam/src/builtins.c +++ b/historic/jam/src/builtins.c @@ -1665,8 +1665,19 @@ PyObject* bjam_call( PyObject * self, PyObject * args ) frame_free( inner ); - Py_INCREF( Py_None ); - return Py_None; + /* Convert the bjam list into a Python list result. */ + { + PyObject * pyResult = PyList_New( list_length( result ) ); + int i = 0; + while ( result ) + { + PyList_SetItem( pyResult, i, PyString_FromString( result->string ) ); + result = list_next( result ); + i += 1; + } + list_free( result ); + return pyResult; + } }