creating windows plugin module with VC++.

Mark Hammond MarkH at ActiveState.com
Thu Jul 20 06:46:16 EDT 2000


This is a FAQ: http://www.python.org/doc/FAQ.html#3.24

Mark.
--
markh at activestate.com - but if you think I speak for them, you dont know
Dick!

<seanh at unforgettable.com> wrote in message
news:Pine.LNX.4.20.0007191840160.30914-100000 at saddam.pseudonetworks.com...
>
> Are there any examples of making a plugin using the VC++ compiler?  I am
> having problems when attempting to define a class object.
>
> The following code:
> static PyTypeObject fwaddressType=
> {
> PyObject_HEAD_INIT(&PyType_Type) // <-OFFENDING LINE OF CODE
> 0,
> "fwaddress",
> sizeof(fwaddress),
> 0,
>
> /* Standard Methods */
> (destructor)fwaddress_dealloc,
> (printfunc)0,
> (getattrfunc)fwaddress_getattr,
> (setattrfunc)0,
> (cmpfunc)0,
> (reprfunc) fwaddress_repr,
>
> /* Type categories */
> 0,
> 0,
> 0,
> 0,
> 0,
> 0
> };
>
> Gives me the following error:
>
>
> D:\phoenix\python\pydh.c(463) : error C2099: initializer is not a
constant
>
> I am not really sure how to get around this error. I was assuming that
> this would have been taken care of in the python headers.
>
> ------------------------------------------------
>    "Nonsense.
>      Space is blue and birds fly through it."
>                 --  Heisenberg
>
> ================================================
> ____________seanh at unforgettable.com_____________
> ------------------------------------------------
>





More information about the Python-list mailing list