[Python-bugs-list] [ python-Bugs-607253 ] header file problems
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 25 Sep 2002 15:16:06 -0700
Bugs item #607253, was opened at 2002-09-10 06:53
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=607253&group_id=5470
Category: Python Interpreter Core
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Ralf W. Grosse-Kunstleve (rwgk)
>Assigned to: Neal Norwitz (nnorwitz)
Summary: header file problems
Initial Comment:
In connection with the Boost.Python library we are
having problems due to missing extern "C" in some
header files. This has prompted me to systematically
look at all header files on the release22-maint branch
and on the CVS trunk. The summary is shown below.
The most severe problem are the missing extern "C"
on the release-22-maint branch. Fortunately, this is
fixed already on the CVS trunk. The next important
problem is that the include guards are missing in
pymactoolbox.h (both trunk and maint branch). I am
not clear if there have to be include guards in files that
only contain #defines (such as patchlevel.h) but
having them would seem safer to me. Finally, the
include guards in two files are not prefixed with Py_,
Again, it would seem safter to me (reduce the chances
of name clashes) if all Python include guards were
consistently prefixed with Py_ .
Ralf
Python release22-maint cvs branch:
extern "C" missing in:
cStringIO.h
descrobject.h
iterobject.h
include guards missing in:
descrobject.h
graminit.h
iterobject.h
patchlevel.h
pymactoolbox.h
(pyconfig.h)
include guard does not start with "Py_":
complexobject.h
cStringIO.h
Python cvs head (Sep 9):
include guards missing in:
graminit.h
patchlevel.h
pymactoolbox.h
(pyconfig.h)
include guard does not start with "Py_":
complexobject.h
cStringIO.h
----------------------------------------------------------------------
Comment By: Ralf W. Grosse-Kunstleve (rwgk)
Date: 2002-09-24 00:56
Message:
Logged In: YES
user_id=71407
Patches for python-release22-maint as requested by Tim
and Guido.
----------------------------------------------------------------------
Comment By: Jack Jansen (jackjansen)
Date: 2002-09-10 08:34
Message:
Logged In: YES
user_id=45365
I've added the include guard to pymactoolbox.h. I've also added include guards and extern "C" constructs (where needed) to the include files in Mac/Include. The other ones I leave to someone else, esp. because I'm not sure things like graminit.h need them.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=607253&group_id=5470