|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r49907 - trunk/tools/jam/src
From: grafikrobot_at_[hidden]
Date: 2008-11-23 22:14:55
Author: grafik
Date: 2008-11-23 22:14:55 EST (Sun, 23 Nov 2008)
New Revision: 49907
URL: http://svn.boost.org/trac/boost/changeset/49907
Log:
Reflect the results of calling bjam from Python. (fixes #2112)
Text files modified:
trunk/tools/jam/src/builtins.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
Modified: trunk/tools/jam/src/builtins.c
==============================================================================
--- trunk/tools/jam/src/builtins.c (original)
+++ trunk/tools/jam/src/builtins.c 2008-11-23 22:14:55 EST (Sun, 23 Nov 2008)
@@ -1665,8 +1665,19 @@
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;
+ }
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk