diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2003-07-05 05:18:41 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2003-07-05 05:18:41 +0400 |
commit | aa820ec42094c2799ca618d3ee174993358c9573 (patch) | |
tree | 41a122e1c1abf87dbe0911548568c1301a277cf2 /source/blender/python/api2_2x/Text.c | |
parent | 20df091c042be721fae0cac911844d603f1dd140 (diff) |
Exppython:
- Continued getting rid of print methods and updating repr ones:
Needed to fix crashes on Windows >= 98 systems.
- Found and fixed a few small memory leaks in EXPP_interface, related to
execution of script links.
Diffstat (limited to 'source/blender/python/api2_2x/Text.c')
-rw-r--r-- | source/blender/python/api2_2x/Text.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/source/blender/python/api2_2x/Text.c b/source/blender/python/api2_2x/Text.c index b08da585c2e..e9343cb2a7b 100644 --- a/source/blender/python/api2_2x/Text.c +++ b/source/blender/python/api2_2x/Text.c @@ -486,21 +486,6 @@ static int Text_compare (BPy_Text *a, BPy_Text *b) } /*****************************************************************************/ -/* Function: Text_print */ -/* Description: This is a callback function for the BPy_Text type. It */ -/* builds a meaninful string to 'print' text objects. */ -/*****************************************************************************/ -static int Text_print(BPy_Text *self, FILE *fp, int flags) -{ - if (self->text && Text_IsLinked(self)) - fprintf(fp, "[Text \"%s\"]", self->text->id.name+2); - else - fprintf(fp, "[Text <deleted>]"); - - return 0; -} - -/*****************************************************************************/ /* Function: Text_repr */ /* Description: This is a callback function for the BPy_Text type. It */ /* builds a meaninful string to represent text objects. */ @@ -508,9 +493,9 @@ static int Text_print(BPy_Text *self, FILE *fp, int flags) static PyObject *Text_repr (BPy_Text *self) { if (self->text && Text_IsLinked(self)) - return PyString_FromString(self->text->id.name+2); + return PyString_FromFormat("[Text \"%s\"]", self->text->id.name+2); else - return PyString_FromString("<deleted>"); + return PyString_FromString("[Text <deleted>]"); } /* Internal function to confirm if a Text wasn't unlinked. |