[python-win32] Issue with win32evtlog.ReportEvent

Amaury Forgeot d'Arc amauryfa at gmail.com
Fri Apr 15 18:56:25 CEST 2011


2011/4/14 Mark Hammond <skippy.hammond at 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.


-- 
Amaury Forgeot d'Arc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swig_pywin32.diff
Type: application/octet-stream
Size: 6285 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-win32/attachments/20110415/f1b9ff4d/attachment.obj>


More information about the python-win32 mailing list