]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Got rid of the static decl of PyCObject_Import, which was a 1.4
authorGuido van Rossum <guido@python.org>
Wed, 9 Apr 1997 18:04:08 +0000 (18:04 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 9 Apr 1997 18:04:08 +0000 (18:04 +0000)
compatibility hack.

Include/cStringIO.h

index 5fd99417f42ab7c75656069bb4f547db39fd1b7a..632177e92dd7e736bda961e609803dc3e5af61e1 100644 (file)
   This would typically be done in your init function.
 
   $Log$
+  Revision 2.4  1997/04/09 18:04:08  guido
+  Got rid of the static decl of PyCObject_Import, which was a 1.4
+  compatibility hack.
+
   Revision 2.3  1997/04/09 17:34:28  guido
   Changed the way the C API was exported.  Jim Fulton.
 
@@ -117,25 +121,6 @@ static struct PycStringIO_CAPI {
 #define PycStringIO_OutputCheck(O) \
   ((O)->ob_type==PycStringIO->OutputType)
 
-static void *
-PyCObject_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=PyCObject_Import("cStringIO", "cStringIO_CAPI")