[Numpy-discussion] C Extension intp problem

David M. Cooke cookedm at physics.mcmaster.ca
Fri Jul 28 15:47:50 CDT 2006

On Fri, 28 Jul 2006 16:25:00 -0400
Nick Fotopoulos <nvf at MIT.EDU> wrote:

> Dear all,
> I had a working C extension, but after upgrading to a recent numpy  
> from SVN, I can no longer compile it.  I've fixed the deprecation  
> warnings, but can't get past this:
> frgetvect.c:51: error: 'intp' undeclared (first use in this function)
> Now, I'm quite confused since I thought that intp should be a global  
> thing, not numpy related, and I believe I'm using the shipped Apple  
> gcc version.

To avoid namespace clashes with other libraries, we've switched to adding a
unique prefix 'npy_' to types (and NPY_ to #defines). You can either change
your code to use 'npy_intp', or add

#include "numpy/noprefix.h"

to the top.

|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca

More information about the Numpy-discussion mailing list