[Numpy-discussion] Namespaces in header files [Was: Time for beta1 of NumPy 1.0]
ltaylor at llnl.gov
Mon Jul 3 18:13:39 CDT 2006
On Thu, 29 Jun 2006, Travis Oliphant wrote:
> I think it's time for the first beta-release of NumPy 1.0
> I'd like to put it out within 2 weeks. Please make any comments or
> voice major concerns so that the 1.0 release series can be as stable as
One issue I ran across that I have not seen addressed is the namespace of
arrayobject.h. I'm not refering to C++ namespaces but prefixing symbols
to avoid clashes with user's code.
The externals start with PyArray. But I had symbol redefinition errors
for byte, MAX_DIMS, and ERR. That is, I already had defines for MAX_DIMS
and ERR and a typedef for byte in my code. When adding a numpy interface
to my library I had to undef these symbols before including arrayobject.h.
Is there a way to move implemention defines, like ERR, into a separate
header. Or if they're part of the API, prefix the symbols?
More information about the Numpy-discussion