Difference for plugins/cfpython/cfpython.c from version 1.21 to 1.22


version 1.21 version 1.22
Line 109
 
Line 109
 static PyObject* getArchetypes(PyObject* self, PyObject* args);  static PyObject* getArchetypes(PyObject* self, PyObject* args);
 static PyObject* getMaps(PyObject* self, PyObject* args);  static PyObject* getMaps(PyObject* self, PyObject* args);
 static PyObject* getParties(PyObject* self, PyObject* args);  static PyObject* getParties(PyObject* self, PyObject* args);
   static PyObject* getRegions(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 168
 
Line 169
     {"GetArchetypes",       getArchetypes,          METH_VARARGS},      {"GetArchetypes",       getArchetypes,          METH_VARARGS},
     {"GetMaps",             getMaps,                METH_VARARGS},      {"GetMaps",             getMaps,                METH_VARARGS},
     {"GetParties",          getParties,             METH_VARARGS},      {"GetParties",          getParties,             METH_VARARGS},
       {"GetRegions",          getRegions,             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 584
 
Line 586
  return list;   return list;
 }  }
   
   static PyObject* getRegions(PyObject* self, PyObject* args)
   {
    PyObject* list;
    region* reg;
   
    list = PyList_New(0);
    reg = cf_region_get_first();
    while (reg)
    {
    PyList_Append(list,Crossfire_Region_wrap(reg));
    reg = cf_region_get_next(reg);
    }
    return list;
   }
   
 static PyObject* registerCommand(PyObject* self, PyObject* args)  static PyObject* registerCommand(PyObject* self, PyObject* args)
 {  {
     char *cmdname;      char *cmdname;
Line 723
 
Line 740
     Crossfire_PlayerType.tp_new = PyType_GenericNew;      Crossfire_PlayerType.tp_new = PyType_GenericNew;
  Crossfire_ArchetypeType.tp_new = PyType_GenericNew;   Crossfire_ArchetypeType.tp_new = PyType_GenericNew;
  Crossfire_PartyType.tp_new = PyType_GenericNew;   Crossfire_PartyType.tp_new = PyType_GenericNew;
    Crossfire_RegionType.tp_new = PyType_GenericNew;
     PyType_Ready(&Crossfire_ObjectType);      PyType_Ready(&Crossfire_ObjectType);
     PyType_Ready(&Crossfire_MapType);      PyType_Ready(&Crossfire_MapType);
     PyType_Ready(&Crossfire_PlayerType);      PyType_Ready(&Crossfire_PlayerType);
  PyType_Ready(&Crossfire_ArchetypeType);   PyType_Ready(&Crossfire_ArchetypeType);
  PyType_Ready(&Crossfire_PartyType);   PyType_Ready(&Crossfire_PartyType);
    PyType_Ready(&Crossfire_RegionType);
   
     m = Py_InitModule("Crossfire", CFPythonMethods);      m = Py_InitModule("Crossfire", CFPythonMethods);
     d = PyModule_GetDict(m);      d = PyModule_GetDict(m);
Line 736
 
Line 755
     Py_INCREF(&Crossfire_PlayerType);      Py_INCREF(&Crossfire_PlayerType);
  Py_INCREF(&Crossfire_ArchetypeType);   Py_INCREF(&Crossfire_ArchetypeType);
  Py_INCREF(&Crossfire_PartyType);   Py_INCREF(&Crossfire_PartyType);
    Py_INCREF(&Crossfire_RegionType);
   
     PyModule_AddObject(m, "Object", (PyObject*)&Crossfire_ObjectType);      PyModule_AddObject(m, "Object", (PyObject*)&Crossfire_ObjectType);
     PyModule_AddObject(m, "Map", (PyObject*)&Crossfire_MapType);      PyModule_AddObject(m, "Map", (PyObject*)&Crossfire_MapType);
     PyModule_AddObject(m, "Player", (PyObject*)&Crossfire_PlayerType);      PyModule_AddObject(m, "Player", (PyObject*)&Crossfire_PlayerType);
  PyModule_AddObject(m, "Archetype", (PyObject*)&Crossfire_ArchetypeType);   PyModule_AddObject(m, "Archetype", (PyObject*)&Crossfire_ArchetypeType);
  PyModule_AddObject(m, "Party", (PyObject*)&Crossfire_PartyType);   PyModule_AddObject(m, "Party", (PyObject*)&Crossfire_PartyType);
    PyModule_AddObject(m, "Region", (PyObject*)&Crossfire_RegionType);
   
     CFPythonError = PyErr_NewException("Crossfire.error",NULL,NULL);      CFPythonError = PyErr_NewException("Crossfire.error",NULL,NULL);
     PyDict_SetItemString(d,"error",CFPythonError);      PyDict_SetItemString(d,"error",CFPythonError);


Legend:
line(s) removed in v.1.21 
line(s) changed
 line(s) added in v.1.22

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