[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21276] branches/blender2.5/blender/source /blender/python/intern/bpy_rna.c: disabling foreach_get/set for python2.x, since it uses new buffer api.
Nathan Letwory
jesterking at letwory.net
Thu Jul 2 12:17:09 CEST 2009
joe wrote:
> yeek!! lots of us use 2.4x python!
Yep, but I do hope we move to Python 3.1 exclusively for official
release of Blender 2.5 somewhere in the conceivably near future.
Currently I'm working on getting Python statically linked into Blender,
but a nasty issue needs to be debugged still. We can always link
dynamically.
/Nathan
>
> Joe
>
> On Tue, Jun 30, 2009 at 3:59 PM, Campbell Barton<ideasman42 at gmail.com> wrote:
>> Revision: 21276
>> http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21276
>> Author: campbellbarton
>> Date: 2009-06-30 23:59:21 +0200 (Tue, 30 Jun 2009)
>>
>> Log Message:
>> -----------
>> disabling foreach_get/set for python2.x, since it uses new buffer api.
>>
>> Modified Paths:
>> --------------
>> branches/blender2.5/blender/source/blender/python/intern/bpy_rna.c
>>
>> Modified: branches/blender2.5/blender/source/blender/python/intern/bpy_rna.c
>> ===================================================================
>> --- branches/blender2.5/blender/source/blender/python/intern/bpy_rna.c 2009-06-30 20:34:00 UTC (rev 21275)
>> +++ branches/blender2.5/blender/source/blender/python/intern/bpy_rna.c 2009-06-30 21:59:21 UTC (rev 21276)
>> @@ -1225,6 +1225,7 @@
>> return ret;
>> }
>>
>> +#if (PY_VERSION_HEX >= 0x03000000) /* foreach needs py3 */
>> static void foreach_attr_type( BPy_PropertyRNA *self, char *attr,
>> /* values to assign */
>> RawPropertyType *raw_type, int *attr_tot, int *attr_signed )
>> @@ -1457,8 +1458,8 @@
>> {
>> return foreach_getset(self, args, 1);
>> }
>> +#endif /* #if (PY_VERSION_HEX >= 0x03000000) */
>>
>> -
>> /* A bit of a kludge, make a list out of a collection or array,
>> * then return the lists iter function, not especially fast but convenient for now */
>> PyObject *pyrna_prop_iter(BPy_PropertyRNA *self)
>> @@ -1502,9 +1503,11 @@
>> {"items", (PyCFunction)pyrna_prop_items, METH_NOARGS,NULL},
>> {"values", (PyCFunction)pyrna_prop_values, METH_NOARGS, NULL},
>>
>> +#if (PY_VERSION_HEX >= 0x03000000)
>> /* array accessor function */
>> {"foreach_get", (PyCFunction)pyrna_prop_foreach_get, METH_VARARGS, NULL},
>> {"foreach_set", (PyCFunction)pyrna_prop_foreach_set, METH_VARARGS, NULL},
>> +#endif
>> {NULL, NULL, 0, NULL}
>> };
>>
>>
>>
>> _______________________________________________
>> Bf-blender-cvs mailing list
>> Bf-blender-cvs at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
--
Nathan Letwory
http://www.planetblender.org | http://www.blender-fi.org
More information about the Bf-committers
mailing list