<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hi,<br>
<br>
in order to resolve a name conflict concerning enums I followed the
description from<br>
<a class="moz-txt-link-freetext" href="http://docs.cython.org/docs/sharing_declarations.html#using-cimport-to-resolve-naming-conflicts">http://docs.cython.org/docs/sharing_declarations.html#using-cimport-to-resolve-naming-conflicts</a><br>
<br>
Here comes my code:<br>
<br>
</tt>
<blockquote><tt>----- minimal.pxd ------------------------</tt><br>
<br>
<tt> cdef extern from "minimal.h":</tt><br>
<br>
<tt> cdef enum test:</tt><br>
<tt> A</tt><br>
<br>
<tt>----- minimal.pyx -------------------------</tt><br>
<br>
<tt> cimport minimal</tt><br>
<br>
<tt> A = minimal.A</tt><br>
<br>
<tt>-------------------------------------------</tt><br>
</blockquote>
<tt><br>
</tt>
<div align="justify"><tt>which does not work. Cython says "Assignment
to non-lvalue 'A'"<br>
If I modify it to "cdef int A = minimal.A" I get "'A' redeclared".<br>
<br>
So, how can I provide the user of my module the same enums<br>
as defined internally ???</tt><br>
</div>
<tt><br>
Greetings, Uwe<br>
</tt>
<pre class="moz-signature" cols="72">--
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
<a class="moz-txt-link-abbreviated" href="mailto:uschmitt@mineway.de">uschmitt@mineway.de</a>
<a class="moz-txt-link-abbreviated" href="http://www.mineway.de">www.mineway.de</a>
Geschäftsführung: Dr.-Ing. Mathias Bauer
Amtsgericht Saarbrücken HRB 12339
</pre>
</body>
</html>