On Wed, 14 May 2008 18:28:53 -0700
Robert Bradshaw <[EMAIL PROTECTED]> wrote:

> On May 13, 2008, at 9:28 AM, Anatoly A. Kazantsev wrote:
> 
> > On Tue, 13 May 2008 14:49:11 +0700
> > "Anatoly A. Kazantsev" <[EMAIL PROTECTED]> wrote:
> >
> > I have next code and it's not working properly.
> >
> > In foo.h somebody wrote:
> >
> > #define BAR 1
> >
> > than I want to define module constant with same name and value:
> >
> > cdef export from "foo.h":
> >   сtypedef enum:
> >     _BAR "BAR"
> >
> > cdef public enum:
> >   BAR = _BAR
> >
> > In python BAR will have 0 not 1. And actually 0 is index number of  
> > BAR in the enum.
> > Looks like value of _BAR is not applyed to BAR in the enum.
> >
> > Maybe I do something wrong.
> 
> Hmm... I am unable to reproduce this--it works for me. Anyone else?
> 
> - Robert

Sorry, that's my fault. I tryed to extern from wrong .h file.
Sorry. All works fine!

-- 
Anatoly A. Kazantsev

Protect your digital freedom and privacy, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm

Attachment: pgpakHLI7kxdl.pgp
Description: PGP signature

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

Reply via email to