[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11618] branches/pyapi_devel/source/ blender/python/api2_2x: aparently MSVC was giving errors here
Campbell Barton
cbarton at metavr.com
Fri Aug 17 02:53:02 CEST 2007
what version of python are you compiling with?
When making a subtype you need to reference the base type (tp_base),
which should be accessible when including Python.h
Heres pythons example module,
http://svn.python.org/projects/python/trunk/Modules/xxsubtype.c
for MSVC we might need to use the DEFERRED_ADDRESS macro.
DEFERRED_ADDRESS(&PyList_Type), /* tp_base */
What is the error the compiler throws anyway?
Joe Eagar wrote:
> jmsoler at free.fr wrote:
>> Selon jmsoler at free.fr:
>>
>>
>>> Selon Campbell Barton <cbarton at metavr.com>:
>>>
>>>
>>>> Revision: 11618
>>>>
>>>>
>>>>
>> http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11618
>>
>>>> Author: campbellbarton
>>>> Date: 2007-08-16 05:46:46 +0200 (Thu, 16 Aug 2007)
>>>>
>>>> Log Message:
>>>> -----------
>>>> aparently MSVC was giving errors here
>>>> replaced PyObject_HEAD_INIT(&PyType_Type) with PyObject_HEAD_INIT(NULL)
>>>>
>>>>
>>> In bpy_float.c, the line 137 :
>>> &PyFloat_Type, /* tp_base */
>>>
>>> compiles better like that :
>>> &BPyFloat_Type, /* tp_base */ ?
>>>
>>>
>>
>> In draw.c, the BPy_Free_DrawButtonsList and BPy_Set_DrawButtonsList should be
>> defined before to be used. MSVC does not like their current places.
>>
>> jms
>>
>>
> Eh? I defined them in BPy_Extern.h. Hrm.
>
> Joe
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
--
Campbell J Barton (ideasman42)
More information about the Bf-committers
mailing list