[Cython] resolving name conflict -- does not work for enums !?
Uwe Schmitt
uschmitt at mineway.de
Thu Oct 2 17:25:17 CEST 2008
Hi,
in order to resolve a name conflict concerning enums I followed the
description from
http://docs.cython.org/docs/sharing_declarations.html#using-cimport-to-resolve-naming-conflicts
Here comes my code:
----- minimal.pxd ------------------------
cdef extern from "minimal.h":
cdef enum test:
A
----- minimal.pyx -------------------------
cimport minimal
A = minimal.A
-------------------------------------------
which does not work. Cython says "Assignment to non-lvalue 'A'"
If I modify it to "cdef int A = minimal.A" I get "'A' redeclared".
So, how can I provide the user of my module the same enums
as defined internally ???
Greetings, Uwe
--
Dr. rer. nat. Uwe Schmitt
F&E Mathematik
mineway GmbH
Science Park 2
D-66123 Saarbrücken
Telefon: +49 (0)681 8390 5334
Telefax: +49 (0)681 830 4376
uschmitt at mineway.de
www.mineway.de
Geschäftsführung: Dr.-Ing. Mathias Bauer
Amtsgericht Saarbrücken HRB 12339
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/cython-dev/attachments/20081002/dd889387/attachment.htm
More information about the Cython-dev
mailing list