Difference for plugins/cfpython/cfpython.c from version 1.8 to 1.9


version 1.8 version 1.9
Line 103
 
Line 103
 static PyObject* getWhatIsMessage(PyObject* self, PyObject* args);  static PyObject* getWhatIsMessage(PyObject* self, PyObject* args);
 static PyObject* getScriptName(PyObject* self, PyObject* args);  static PyObject* getScriptName(PyObject* self, PyObject* args);
 static PyObject* getScriptParameters(PyObject* self, PyObject* args);  static PyObject* getScriptParameters(PyObject* self, PyObject* args);
   static PyObject* getPrivateDictionary(PyObject* self, PyObject* args);
   static PyObject* getSharedDictionary(PyObject* self, PyObject* args);
 static PyObject* registerCommand(PyObject* self, PyObject* args);  static PyObject* registerCommand(PyObject* self, PyObject* args);
 static PyObject* registerGEvent(PyObject* self, PyObject* args);  static PyObject* registerGEvent(PyObject* self, PyObject* args);
 static PyObject* unregisterGEvent(PyObject* self, PyObject* args);  static PyObject* unregisterGEvent(PyObject* self, PyObject* args);
Line 157
 
Line 159
     {"PluginVersion",       getCFPythonVersion,     METH_VARARGS},      {"PluginVersion",       getCFPythonVersion,     METH_VARARGS},
     {"CreateObject",        createCFObject,         METH_VARARGS},      {"CreateObject",        createCFObject,         METH_VARARGS},
     {"CreateObjectByName",  createCFObjectByName,   METH_VARARGS},      {"CreateObjectByName",  createCFObjectByName,   METH_VARARGS},
       {"GetPrivateDictionary",  getPrivateDictionary,   METH_VARARGS},
       {"GetSharedDictionary",  getSharedDictionary,   METH_VARARGS},
     {"RegisterCommand",     registerCommand,        METH_VARARGS},      {"RegisterCommand",     registerCommand,        METH_VARARGS},
     {"RegisterGlobalEvent", registerGEvent,         METH_VARARGS},      {"RegisterGlobalEvent", registerGEvent,         METH_VARARGS},
     {"UnregisterGlobalEvent",unregisterGEvent,      METH_VARARGS},      {"UnregisterGlobalEvent",unregisterGEvent,      METH_VARARGS},
Line 166
 
Line 170
 CFPContext* context_stack;  CFPContext* context_stack;
 CFPContext* current_context;  CFPContext* current_context;
 static int current_command = -999;  static int current_command = -999;
   static PyObject* shared_data = NULL;
   static PyObject* private_data = NULL;
   
 static PyObject* registerGEvent(PyObject* self, PyObject* args)  static PyObject* registerGEvent(PyObject* self, PyObject* args)
 {  {
Line 481
 
Line 487
         return NULL;          return NULL;
     return Py_BuildValue("s", current_context->options);      return Py_BuildValue("s", current_context->options);
 }  }
   
   static PyObject* getPrivateDictionary(PyObject* self, PyObject* args)
   {
    PyObject* data;
   
       if (!PyArg_ParseTuple(args,"",NULL))
           return NULL;
   
    data = PyDict_GetItemString(private_data,current_context->script);
    if (!data)
    {
    data = PyDict_New();
    PyDict_SetItemString(private_data,current_context->script,data);
    Py_DECREF(data);
    }
    Py_INCREF(data);
    return data;
   }
   
   static PyObject* getSharedDictionary(PyObject* self, PyObject* args)
   {
       if (!PyArg_ParseTuple(args,"",NULL))
           return NULL;
   
    Py_INCREF(shared_data);
    return shared_data;
   }
   
 static PyObject* registerCommand(PyObject* self, PyObject* args)  static PyObject* registerCommand(PyObject* self, PyObject* args)
 {  {
     char *cmdname;      char *cmdname;
Line 579
 
Line 613
         CustomCommand[i].script = NULL;          CustomCommand[i].script = NULL;
         CustomCommand[i].speed  = 0.0;          CustomCommand[i].speed  = 0.0;
     }      }
    private_data = PyDict_New();
    shared_data = PyDict_New();
     return 0;      return 0;
 }  }
   


Legend:
line(s) removed in v.1.8 
line(s) changed
 line(s) added in v.1.9

File made using version 1.98 of cvs2html by leaf at 2011-07-21 16:59