/[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 877 by johnpye, Sat Oct 7 09:31:51 2006 UTC revision 880 by johnpye, Sun Oct 8 23:38:31 2006 UTC
# Line 18  Line 18 
18  *//**  *//**
19      @file      @file
20      Import handler to provide external python script functionality for ASCEND.      Import handler to provide external python script functionality for ASCEND.
21    *//*
22        by John Pye, Oct 2006
23  */  */
24    
25  #include <stdio.h>  #include <stdio.h>
# Line 186  static PyObject *extpy_registermethod(Py Line 188  static PyObject *extpy_registermethod(Py
188    
189      /* nothing gets returned (but possibly an exception) */      /* nothing gets returned (but possibly an exception) */
190      Py_INCREF(Py_None);      Py_INCREF(Py_None);
191      return Py_None;      return Py_None;
192  }  }
193    
194  static PyMethodDef extpymethods[] = {  static PyMethodDef extpymethods[] = {
# Line 268  int extpy_import(const struct FilePath * Line 270  int extpy_import(const struct FilePath *
270          ASC_FREE(name);          ASC_FREE(name);
271          return 1;          return 1;
272      }      }
273        
274      f = PyFile_AsFile(pyfile);            f = PyFile_AsFile(pyfile);
275      if(f==NULL){      if(f==NULL){
276          ERROR_REPORTER_HERE(ASC_PROG_ERR,"Unable to cast PyObject to FILE*");          ERROR_REPORTER_HERE(ASC_PROG_ERR,"Unable to cast PyObject to FILE*");
277          ASC_FREE(name);          ASC_FREE(name);

Legend:
Removed from v.877  
changed lines
  Added in v.880

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