[Python-checkins] python/dist/src/Include cStringIO.h,2.17,2.18

jhylton@users.sourceforge.net jhylton@users.sourceforge.net
Mon, 05 Aug 2002 11:20:04 -0700


Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv6454

Modified Files:
	cStringIO.h 
Log Message:
Remove function definition from cStringIO.h.

xxxPyCObject_Import() seems to be a copy of PyCObject_Import().



Index: cStringIO.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/cStringIO.h,v
retrieving revision 2.17
retrieving revision 2.18
diff -C2 -d -r2.17 -r2.18
*** cStringIO.h	4 Apr 2002 17:52:50 -0000	2.17
--- cStringIO.h	5 Aug 2002 18:20:01 -0000	2.18
***************
*** 19,22 ****
--- 19,25 ----
  
  */
+ #define PycString_IMPORT \
+   PycStringIO = (struct PycStringIO_CAPI*)PyCObject_Import("cStringIO", \
+                                                            "cStringIO_CAPI")
  
  /* Basic functions to manipulate cStringIO objects from C */
***************
*** 47,51 ****
    PyTypeObject *InputType, *OutputType;
  
! } * PycStringIO = NULL;
  
  /* These can be used to test if you have one */
--- 50,54 ----
    PyTypeObject *InputType, *OutputType;
  
! } *PycStringIO;
  
  /* These can be used to test if you have one */
***************
*** 54,79 ****
  #define PycStringIO_OutputCheck(O) \
    ((O)->ob_type==PycStringIO->OutputType)
- 
- static void *
- xxxPyCObject_Import(char *module_name, char *name)
- {
-   PyObject *m, *c;
-   void *r=NULL;
-   
-   if((m=PyImport_ImportModule(module_name)))
-     {
-       if((c=PyObject_GetAttrString(m,name)))
- 	{
- 	  r=PyCObject_AsVoidPtr(c);
- 	  Py_DECREF(c);
- 	}
-       Py_DECREF(m);
-     }
- 
-   return r;
- }
- 
- #define PycString_IMPORT \
-   PycStringIO=(struct PycStringIO_CAPI*)xxxPyCObject_Import("cStringIO", "cStringIO_CAPI")
  
  #ifdef __cplusplus
--- 57,60 ----