diff options
Diffstat (limited to 'source/blender/python/api2_2x/Text.c')
-rw-r--r-- | source/blender/python/api2_2x/Text.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Text.c b/source/blender/python/api2_2x/Text.c index a447a4ff6ce..49f871cdef0 100644 --- a/source/blender/python/api2_2x/Text.c +++ b/source/blender/python/api2_2x/Text.c @@ -443,6 +443,20 @@ static int TextSetAttr (C_Text *self, char *name, PyObject *value) } /*****************************************************************************/ +/* Function: TextCompare */ +/* Description: This is a callback function for the C_Text type. It */ +/* compares two Text_Type objects. Only the "==" and "!=" */ +/* comparisons are meaninful. Returns 0 for equality and -1 if */ +/* they don't point to the same Blender Text struct. */ +/* In Python it becomes 1 if they are equal, 0 otherwise. */ +/*****************************************************************************/ +static int TextCompare (C_Text *a, C_Text *b) +{ + Text *pa = a->text, *pb = b->text; + return (pa == pb) ? 0:-1; +} + +/*****************************************************************************/ /* Function: TextPrint */ /* Description: This is a callback function for the C_Text type. It */ /* builds a meaninful string to 'print' text objects. */ |