From: John P. <joh...@st...> - 2007-03-21 00:14:36
|
Hi all There is fairly well-known problem on MinGW with passing FILE pointers to Python. The problem seems to be that Python depends on a different version of msvcrt*.dll to that which MinGW depends on, and these different C runtimes provide different FILE implementations. The upshot of that seems to be that file objects created in Python via the 'file(...)' command can't safely be used in a SWIG module. It can be done perfectly (using SWIG typemap and PyFile_AsFile) on Linux but it fails with a segfault on Windows. What is the best possible workaround for this? Surely someone must have found a satisfactory solution to this problem? Cheeers JP -- John Pye Department of Mechanical and Manufacturing Engineering University of New South Wales, Sydney, Australia http://pye.dyndns.org/ |