Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Gilbert <ascotan@gmail.com>2005-11-08 19:27:58 +0300
committerJoseph Gilbert <ascotan@gmail.com>2005-11-08 19:27:58 +0300
commitcd7ca03034dd9a1d1ca2c9159da245605ddce597 (patch)
tree8a710123377b1c46ea69f5241989726b7c5751ee /source/blender/python/api2_2x/constant.c
parentbcd723c0af69db905b2850db24ea88a696acac9f (diff)
*work around for PyDict_Contains
Diffstat (limited to 'source/blender/python/api2_2x/constant.c')
-rw-r--r--source/blender/python/api2_2x/constant.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/constant.c b/source/blender/python/api2_2x/constant.c
index cf499a89921..f131a169089 100644
--- a/source/blender/python/api2_2x/constant.c
+++ b/source/blender/python/api2_2x/constant.c
@@ -136,13 +136,14 @@ static PyObject *constant_getAttr(BPy_constant * self, char *name)
static PyObject *constant_repr(BPy_constant * self)
{
char buffer[128], str[4096];
- PyObject *key, *value;
+ PyObject *key, *value, *keys;
int pos = 0;
BLI_strncpy(str,"",4096);
sprintf(buffer, "[Constant: ");
strcat(str,buffer);
- if (PyDict_Contains(self->dict, PyString_FromString("name"))){
+ keys = PyDict_Keys(self->dict);
+ if (PySequence_Contains(keys, PyString_FromString("name"))){
value = PyDict_GetItemString(self->dict, "name");
sprintf(buffer, "%s", PyString_AsString(value));
strcat(str,buffer);