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

[EMAIL PROTECTED]
www.mineway.de

Geschäftsführung: Dr.-Ing. Mathias Bauer
Amtsgericht Saarbrücken HRB 12339


_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to