Difference for plugins/cfpython/cfpython.c from version 1.1 to 1.2


version 1.1 version 1.2
Line 561
 
Line 561
         return NULL;          return NULL;
 }  }
   
 int   initPlugin(const char* iversion, f_plug_api gethooksptr)  CF_PLUGIN int initPlugin(const char* iversion, f_plug_api gethooksptr)
 {  {
     PyObject *m, *d;      PyObject *m, *d;
     gethook = gethooksptr;  
     int i;      int i;
       gethook = gethooksptr;
     printf("CFPython 2.0a init\n");      printf("CFPython 2.0a init\n");
   
     Py_Initialize();      Py_Initialize();
Line 587
 
Line 587
     return 0;      return 0;
 }  }
   
 void* getPluginProperty(int* type, ...)  CF_PLUGIN void* getPluginProperty(int* type, ...)
 {  {
     va_list args;      va_list args;
     char* propname;      char* propname;
     int i;      int i;
       static CommArray_s rtn_cmd;
   
     va_start(args, type);      va_start(args, type);
     propname = va_arg(args, char *);      propname = va_arg(args, char *);
     printf("Property name: %s\n", propname);      printf("Property name: %s\n", propname);
     static CommArray_s rtn_cmd;  
   
     if(!strcmp(propname,"command?"))      if(!strcmp(propname,"command?"))
     {      {
Line 633
 
Line 634
     return NULL;      return NULL;
 }  }
   
 int runPluginCommand(object* op, char* params)  CF_PLUGIN int runPluginCommand(object* op, char* params)
 {  {
     FILE*        scriptfile;      FILE*        scriptfile;
     char         buf[1024];      char         buf[1024];
Line 680
 
Line 681
     return rv;      return rv;
 }  }
   
 int postInitPlugin()  CF_PLUGIN int postInitPlugin()
 {  {
     int hooktype = 1;      int hooktype = 1;
     int rtype = 0;      int rtype = 0;
Line 710
 
Line 711
     return 0;      return 0;
 }  }
   
 void* globalEventListener(int* type, ...)  CF_PLUGIN void* globalEventListener(int* type, ...)
 {  {
     va_list args;      va_list args;
     static int rv=0;      static int rv=0;
Line 718
 
Line 719
     CFPContext* context;      CFPContext* context;
     Crossfire_Player* cfpl;      Crossfire_Player* cfpl;
     Crossfire_Object* cfob;      Crossfire_Object* cfob;
     context = malloc(sizeof(CFPContext));  
     char* buf;      char* buf;
     player* pl;      player* pl;
     object* op;      object* op;
       context = malloc(sizeof(CFPContext));
   
     va_start(args, type);      va_start(args, type);
     context->event_code = va_arg(args, int);      context->event_code = va_arg(args, int);
Line 873
 
Line 874
     return &rv;      return &rv;
 }  }
   
 void* eventListener(int* type, ...)  CF_PLUGIN void* eventListener(int* type, ...)
 {  {
     static int rv=0;      static int rv=0;
     va_list args;      va_list args;
Line 926
 
Line 927
     return &rv;      return &rv;
 }  }
   
 int   closePlugin()  CF_PLUGIN int   closePlugin()
 {  {
     printf("CFPython 2.0a closing\n");      printf("CFPython 2.0a closing\n");
     return 0;      return 0;


Legend:
line(s) removed in v.1.1 
line(s) changed
 line(s) added in v.1.2

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