[Pyrex] cimport in .pxd?

Toshio toshio at tiki-lounge.com
Wed Jan 14 20:18:42 CET 2004


Hi,

I'm trying to wrap a set of libraries that depend on each other.
I thought that I could create a bunch of .pxd files that wrap the
headers of each library and then cimport the files together.  But
it seems that Pyrex isn't taking any definitions from the cimport to
help resolve the stuff in another .pxd.

Is this expected behavior?  Am I doing something wrong?  Here's some
sample code that doesn't work for me:

### file: test1.pxd
cimport test2

cdef extern from "test1.h":
	struct tester:
		tester_t there

### file: test2.pxd
cdef extern from "test2.h":
	struct test_t tester_t:
		int Nothing

### file: test1.pyx
cimport test1
def DoNothing():
	pass
$ pyrexc test1.pyx
/home/badger/programming/subversion/test/test1.pxd:5:8: Syntax error in
C variable declaration

Thanks,
Toshio
-- 
Toshio <toshio at tiki-lounge.com>




More information about the Pyrex mailing list