[PyKDE] Re: Use of enum in a namespace with SIP
Phil Thompson
phil at riverbankcomputing.co.uk
Thu May 5 21:19:31 BST 2005
On Tuesday 03 May 2005 10:34 pm, Claus, Richard wrote:
> Hello,
>
> The following sip code does not produce compilable code with sip 4.2
> (4.2rc2-289, Windows XP SP2).
>
> %Module MyTest
>
> namespace MyNamespace {
>
> enum MyEnum {a, b, c, d};
>
> };
>
> The generated sipMyTestMyNamespace.cpp code contains references to
> MyNamespace::a, etc., where the namespace MyNamespace is undefined. I
> can't seem to figure out how to get a "#include" directive to appear in the
> generated code that would define the namespace.
From tonight's snapshot you can use %TypeHeaderCode in namespaces. Let me know
if you need anything more.
> Secondly, I can't seem to provide a reference to the enum's members as
> defined in some C++ code. Any %<xxx>Code directive produces a "syntax
> error" message.
Sorry, I don't know what you mean here.
Phil
More information about the PyQt
mailing list