python-ldap does not include Python.h first

Anthony Baxter anthony at interlink.com.au
Tue Oct 28 08:26:54 CET 2003


python-ldap breaks the "Always include Python.h first" rule in it's
C files - see, e.g. 
http://www.python.org/dev/doc/devel/ext/simpleExample.html

    The first line of our file can be:

    #include <Python.h>

    which pulls in the Python API (you can add a comment describing the
    purpose of the module and a copyright notice if you like). Since
    Python may define some pre-processor definitions which affect the
    standard headers on some systems, you must include Python.h before
    any standard headers are included.

At least on this Linux Redhat 9 system, this causes all sorts of 
horrible warnings to be emitted. Doing the right thing makes them 
go away. Patch attached.

Anthony

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 1260 bytes
Desc: Python.h-first-patch
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20031028/23b1d4e6/attachment.obj>


More information about the python-ldap mailing list