[Pyrex] access to Modules/*.c or ignoring void**/char** casts

khinsen at cea.fr khinsen at cea.fr
Sat Mar 26 11:48:45 CET 2005


On 25.03.2005, at 02:17, Josiah Carlson wrote:

> Problem 1:
> Memory mapped file objects are defined in mmapmodule.c, which has no
> includable header file.  There exists mmap.lib in the libs path, and
> mmap.pyd in the dll path (I'm running windows), and the build process
> properly includes the lib path, but I am unable to get it to include
> anything sufficient (I get either "can't find mmap.lib|mmap.pyd" or
> "cannot resolve symbol _mmap_buffer_getwritebuf").
>
> Question 1:
> How does one gain access to functions defined in mmapmodule.c, or any
> function defined in any of the Python source Modules/*.c files?

Not at all unless they are somehow accessible through Python objects. A  
way to export C APIs through Python objects is the CObject, which  
doesn't do anything useful at the Python level but stores pointers and  
makes them accessible to other modules through the import mechanism. If  
mmap (or any other module) doesn't create such objects, you can try to  
add the necessary code and convince the original module author to  
accept the addition.

Konrad.
--
------------------------------------------------------------------------ 
-------
Konrad Hinsen
Laboratoire Leon Brillouin, CEA Saclay,
91191 Gif-sur-Yvette Cedex, France
Tel.: +33-1 69 08 79 25
Fax: +33-1 69 08 82 61
E-Mail: khinsen at cea.fr
------------------------------------------------------------------------ 
-------





More information about the Pyrex mailing list