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-07-18 07:50:37 +0400
committerJoseph Gilbert <ascotan@gmail.com>2005-07-18 07:50:37 +0400
commite60291d39c0f77282a2d17f79e9264107bbc495e (patch)
tree274f6c0fc564553bb1484abfc5ad33e758d00903 /source/blender/python/api2_2x/Text3d.c
parent9919df089dc34a62ac14f5c151d7815ee852bd81 (diff)
Header file clean up and warning fixes
- Mostly this cleans up the #includes and header files in the python project. - Warning fixes are mostly casting issues and misc fixes. General warning clean up. - #include Python.h MUST come as the first include to avoid the POSIX redefine warning in the unix makefiles - fno-strict-aliasing flag added to makefile to fix a unavoidable type punning warning in types.c
Diffstat (limited to 'source/blender/python/api2_2x/Text3d.c')
-rw-r--r--source/blender/python/api2_2x/Text3d.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/source/blender/python/api2_2x/Text3d.c b/source/blender/python/api2_2x/Text3d.c
index 36888c16d50..aa0e6026cfd 100644
--- a/source/blender/python/api2_2x/Text3d.c
+++ b/source/blender/python/api2_2x/Text3d.c
@@ -30,27 +30,20 @@
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+
+#include "Text3d.h" /*This must come first*/
+
#include "DNA_object_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_view3d_types.h"
-#include "DNA_vfont_types.h"
#include "MEM_guardedalloc.h"
-#include "BKE_object.h"
-#include "BDR_editobject.h"
-#include "BKE_displist.h"
-#include "MEM_guardedalloc.h"
-#include "mydevice.h"
-#include "blendef.h"
-#include "Text3d.h"
+#include "BKE_curve.h"
+#include "BKE_library.h"
+#include "BKE_global.h"
+#include "BKE_main.h"
#include "Curve.h"
#include "constant.h"
#include "Types.h"
#include "Font.h"
-
-#include "mydevice.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
+#include "gen_utils.h"
//no prototypes declared in header files - external linkage outside of python
extern VFont *get_builtin_font(void);
@@ -495,8 +488,8 @@ static PyObject *Text3d_setText( BPy_Text3d * self, PyObject * args )
MEM_freeN( self->curve->str );
self->curve->str = MEM_mallocN( strlen (text)+1, "str" );
strcpy( self->curve->str, text );
- self->curve->pos = strlen ( text );
- self->curve->len = strlen ( text );
+ self->curve->pos = (short)strlen ( text );
+ self->curve->len = (short)strlen ( text );
}
Py_INCREF( Py_None );
return Py_None;
@@ -955,7 +948,7 @@ PyObject *M_Text3d_LoadFont( PyObject * self, PyObject * args )
if( file || !strcmp (fontfile, "<builtin>") ) {
load_vfont( fontfile );
if(file) fclose( file );
- if( (vf=exist_vfont( fontfile )) )
+ if( (vf == exist_vfont( fontfile )) )
return Font_CreatePyObject( vf );
return EXPP_incr_ret( Py_None );
}