diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-08 05:16:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-08 05:16:59 +0400 |
commit | adf7bfa8bb530db8baf7c07dd296851658ee925e (patch) | |
tree | 2e8c7925b420f4c18aa85d76a1e3275a829d027b /source/blender/python/mathutils/mathutils_Color.c | |
parent | 0bca862e9c6a20bd5a69a370bee7c4da3e187e46 (diff) |
ifdef out dynstr so mathutils can be compiled as an external module again.
Diffstat (limited to 'source/blender/python/mathutils/mathutils_Color.c')
-rw-r--r-- | source/blender/python/mathutils/mathutils_Color.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c index f16b488f9d0..4a29e72418b 100644 --- a/source/blender/python/mathutils/mathutils_Color.c +++ b/source/blender/python/mathutils/mathutils_Color.c @@ -31,7 +31,10 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLI_dynstr.h" + +#ifndef MATH_STANDALONE +# include "BLI_dynstr.h" +#endif #define COLOR_SIZE 3 @@ -131,6 +134,7 @@ static PyObject *Color_repr(ColorObject *self) return ret; } +#ifndef MATH_STANDALONE static PyObject *Color_str(ColorObject *self) { DynStr *ds; @@ -145,6 +149,7 @@ static PyObject *Color_str(ColorObject *self) return mathutils_dynstr_to_py(ds); /* frees ds */ } +#endif /* ------------------------tp_richcmpr */ /* returns -1 exception, 0 false, 1 true */ @@ -820,7 +825,11 @@ PyTypeObject color_Type = { &Color_AsMapping, /* tp_as_mapping */ NULL, /* tp_hash */ NULL, /* tp_call */ +#ifndef MATH_STANDALONE (reprfunc) Color_str, /* tp_str */ +#else + NULL, /* tp_str */ +#endif NULL, /* tp_getattro */ NULL, /* tp_setattro */ NULL, /* tp_as_buffer */ |