Changeset 114 for trunk/zoo-kernel/service_internal_python.c
- Timestamp:
- Feb 12, 2011, 4:14:17 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-kernel/service_internal_python.c
r108 r114 86 86 } 87 87 pModule = PyImport_Import(pName); 88 int i;89 88 int res=SERVICE_FAILED; 90 int cpid=getpid();91 89 if (pModule != NULL) { 92 90 pFunc=PyObject_GetAttrString(pModule,s->name); 93 91 if (pFunc && PyCallable_Check(pFunc)){ 92 PyObject *pValue; 94 93 PyDictObject* arg1=PyDict_FromMaps(m); 95 94 PyDictObject* arg2=PyDict_FromMaps(inputs); 96 95 PyDictObject* arg3=PyDict_FromMaps(outputs); 97 96 PyObject *pArgs=PyTuple_New(3); 98 PyObject *pValue; 97 if (!pArgs) 98 return -1; 99 99 PyTuple_SetItem(pArgs, 0, (PyObject *)arg1); 100 100 PyTuple_SetItem(pArgs, 1, (PyObject *)arg2); … … 130 130 PyErr_Fetch(&ptype, &pvalue, &ptraceback); 131 131 PyObject *trace=PyObject_Str(pvalue); 132 char tb[1024];133 132 char pbt[10240]; 134 133 if(PyString_Check(trace)) … … 145 144 else 146 145 fprintf(stderr,"EMPTY TRACE ?"); 147 PyObject *t;148 146 pName = PyString_FromString("traceback"); 149 147 pModule = PyImport_Import(pName); … … 302 300 int nb=PyList_Size(list); 303 301 int i; 304 int sizeValue=-1;305 302 for(i=0;i<nb;i++){ 306 303 PyObject* key=PyList_GetItem(list,i);
Note: See TracChangeset
for help on using the changeset viewer.