Changeset 217 for branches/branch-1.2/zoo-kernel/service_internal_python.c
- Timestamp:
- May 31, 2011, 3:30:49 AM (13 years ago)
- Location:
- branches/branch-1.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1.2
-
branches/branch-1.2/zoo-kernel/service_internal_python.c
r108 r217 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.