/[ascend]/trunk/models/johnpye/extpy/extpy.c
ViewVC logotype

Diff of /trunk/models/johnpye/extpy/extpy.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 913 by johnpye, Fri Oct 27 07:18:21 2006 UTC revision 914 by johnpye, Sat Oct 28 05:27:58 2006 UTC
# Line 38  Line 38 
38  ImportHandlerCreateFilenameFn extpy_filename;  ImportHandlerCreateFilenameFn extpy_filename;
39  ImportHandlerImportFn extpy_import;  ImportHandlerImportFn extpy_import;
40    
41    ExtMethodDestroyFn extpy_destroy;
42    
43    
44  #ifndef ASC_EXPORT  #ifndef ASC_EXPORT
45  # error "Where is ASC_EXPORT?"  # error "Where is ASC_EXPORT?"
46  #endif  #endif
# Line 139  int extpy_invokemethod(struct Instance * Line 142  int extpy_invokemethod(struct Instance *
142    
143  /**  /**
144      Free memory associated with a registered script method.      Free memory associated with a registered script method.
145        @return 0 on success
146  */  */
147  void extpy_destroy(void *user_data){  int extpy_destroy(void *user_data){
148      struct ExtPyData *extpydata;      struct ExtPyData *extpydata;
149      extpydata = (struct ExtPyData *)user_data;      extpydata = (struct ExtPyData *)user_data;
150      Py_DECREF(extpydata->fn);      Py_DECREF(extpydata->fn);
151      ASC_FREE(extpydata->name);      ASC_FREE(extpydata->name);
152      ASC_FREE(extpydata);      ASC_FREE(extpydata);
153        return 0;
154  }  }
155    
156  /*------------------------------------------------------------------------------  /*------------------------------------------------------------------------------

Legend:
Removed from v.913  
changed lines
  Added in v.914

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22