modification to the python generator
authorFilippo Gioachin <gioachin@illinois.edu>
Sun, 24 Oct 2004 03:04:07 +0000 (03:04 +0000)
committerFilippo Gioachin <gioachin@illinois.edu>
Sun, 24 Oct 2004 03:04:07 +0000 (03:04 +0000)
src/xlat-i/xi-symbol.C

index 1f92abe5b954fff095c806f3d7797aa7edd54f3c..29f63b52e2a56c3a4136159f73c0f0f5d0e9f9da 100644 (file)
@@ -2387,10 +2387,10 @@ void Entry::genPythonDefs(XStr& str) {
     str << "PyObject *_Python_"<<container->baseName()<<"_"<<name<<"(PyObject *self, PyObject *arg) {\n";
     str << "  int pyNumber = PyInt_AsLong(PyDict_GetItemString(PyModule_GetDict(PyImport_AddModule(\"__main__\")),\"charmNumber\"));\n";
     str << "  CmiLock(CsvAccess(pyLock));\n";
-    str << "  "<<container->baseName()<<" *pyWorker = ("<<container->baseName()<<" *)(*CsvAccess(pyWorkers))[pyNumber];\n";
-    str << "  ((*CsvAccess(pyThread))[pyNumber]).arg=arg;\n";
-    str << "  ((*CsvAccess(pyThread))[pyNumber]).result=&CtvAccess(pythonReturnValue);\n";
-    str << "  ((*CsvAccess(pyThread))[pyNumber]).pythread=PyThreadState_Get();\n";
+    str << "  "<<container->baseName()<<" *pyWorker = ("<<container->baseName()<<" *)((*CsvAccess(pyWorkers))[pyNumber]).object;\n";
+    str << "  ((*CsvAccess(pyWorkers))[pyNumber]).arg=arg;\n";
+    str << "  ((*CsvAccess(pyWorkers))[pyNumber]).result=&CtvAccess(pythonReturnValue);\n";
+    str << "  ((*CsvAccess(pyWorkers))[pyNumber]).pythread=PyThreadState_Get();\n";
     str << "  CmiUnlock(CsvAccess(pyLock));\n";
 
     str << "  pyWorker->thisProxy."<<name<<"(pyNumber);\n";