That is awesome - thanks very much. It works as advertised (although there was one trivial problem in the patch when generating COM objects that I fixed.)

It works just fine with a py2k build, so all I need to do it integrate the changes Roger made for py3k into the mix and we are in a much better position :)

Again, thanks, and I'll check this in over the next week or so...

Cheers,

Mark

On 16/04/2011 2:56 AM, Amaury Forgeot d'Arc wrote:
2011/4/14 Mark Hammond<skippy.hamm...@gmail.com>:
Sadly some hacks were made to SWIG to support some of the COM objects and
the source to those changes were lost many years ago - this needs to be
revisited before we can upgrade.  I haven't put much thought into that yet
but I'm sure something can be done...

Here you are! Now you can comply with Swig's GPL license...

I managed to hack an old version of SWIG and reproduce the same generated files:
Start with the old swig 1.1p5:
http://sourceforge.net/projects/swig/files/swig/1.1p5/
and apply the attached patch.

The differences with the files generated generated by the old swig.exe
are small,
and are all similar to this one: where you previously had::
     static PyObject *_wrap_python_const_FILE_GENERIC_READ;
     ...
         _wrap_python_const_FILE_GENERIC_READ =
PyInt_FromLong(FILE_GENERIC_READ);
         PyDict_SetItemString(d,"FILE_GENERIC_READ",
_wrap_python_const_FILE_GENERIC_READ);
You now have:
         PyDict_SetItemString(d,"FILE_GENERIC_READ",
PyInt_FromLong((long) FILE_GENERIC_READ));
Which is a small improvement IMO.



_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to