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:
authorCampbell Barton <ideasman42@gmail.com>2009-09-03 05:52:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-09-03 05:52:10 +0400
commitac3f0695a2cf3d5706d8f49b1276579889997990 (patch)
treeae34b25fab82b9dd33313785cf600d26737de24f /source/blender/python/intern/bpy_util.c
parent9004dc665cd303dc6bc84d1ea92716dc0c0020d3 (diff)
remove Py_CmpToRich (copy of py3.0 function), instead only support == and != for PyRNA and KX_PySequence types.
mesh1 > mesh2 # will raise an error.
Diffstat (limited to 'source/blender/python/intern/bpy_util.c')
-rw-r--r--source/blender/python/intern/bpy_util.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c
index be343843acc..1766be62c83 100644
--- a/source/blender/python/intern/bpy_util.c
+++ b/source/blender/python/intern/bpy_util.c
@@ -122,44 +122,6 @@ int BPY_flag_from_seq(BPY_flag_def *flagdef, PyObject *seq, int *flag)
return 0; /* ok */
}
-
-/* Copied from pythons 3's Object.c */
-PyObject *
-Py_CmpToRich(int op, int cmp)
-{
- PyObject *res;
- int ok;
-
- if (PyErr_Occurred())
- return NULL;
- switch (op) {
- case Py_LT:
- ok = cmp < 0;
- break;
- case Py_LE:
- ok = cmp <= 0;
- break;
- case Py_EQ:
- ok = cmp == 0;
- break;
- case Py_NE:
- ok = cmp != 0;
- break;
- case Py_GT:
- ok = cmp > 0;
- break;
- case Py_GE:
- ok = cmp >= 0;
- break;
- default:
- PyErr_BadArgument();
- return NULL;
- }
- res = ok ? Py_True : Py_False;
- Py_INCREF(res);
- return res;
-}
-
/* for debugging */
void PyObSpit(char *name, PyObject *var) {
fprintf(stderr, "<%s> : ", name);