new round of warning fixes. we are now down to 24 with Xcode on blender
alone with the following flags : -Wall -Wno-char-subscripts -Wno-missing-braces. the only one still worrying me is in rand.c line 57 : rand.c:57: integer constant is too large for "long" type but i have no clue about how correct cross-compiler and 32/64 bits friendly see also my mail to commiter list for signed/unsigned issues
This commit is contained in:
@@ -115,6 +115,9 @@ int BPY_txt_do_python_Text( struct Text *text );
|
||||
void BPY_Err_Handle( char *script_name );
|
||||
PyObject *traceback_getFilename( PyObject * tb );
|
||||
|
||||
void BPY_free_screen_spacehandlers(struct bScreen *sc);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Description: This function will initialise Python and all the implemented
|
||||
* api variations.
|
||||
|
||||
@@ -200,7 +200,7 @@ struct VFont *Font_FromPyObject( PyObject * py_obj )
|
||||
PyObject *M_Font_New( PyObject * self, PyObject * args )
|
||||
{
|
||||
char *name_str = "<builtin>";
|
||||
char *parent_str = "";
|
||||
// char *parent_str = "";
|
||||
BPy_Font *py_font = NULL; /* for Font Data object wrapper in Python */
|
||||
PyObject *tmp;
|
||||
|
||||
@@ -211,7 +211,7 @@ PyObject *M_Font_New( PyObject * self, PyObject * args )
|
||||
/*create python font*/
|
||||
if( !S_ISDIR(BLI_exist(name_str)) ) {
|
||||
tmp= Py_BuildValue("(s)", name_str);
|
||||
py_font= M_Text3d_LoadFont (self, Py_BuildValue("(s)", name_str));
|
||||
py_font= (BPy_Font *) M_Text3d_LoadFont (self, Py_BuildValue("(s)", name_str));
|
||||
Py_DECREF (tmp);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -905,7 +905,7 @@ static PyObject *Text3d_getFont( BPy_Text3d * self )
|
||||
static PyObject *Text3d_setFont( BPy_Text3d * self, PyObject * args )
|
||||
{
|
||||
BPy_Font *pyobj= NULL;
|
||||
VFont *vf, *vfont;
|
||||
VFont *vf; //, *vfont;
|
||||
if( !PyArg_ParseTuple( args, "|O!",&Font_Type, &pyobj) )
|
||||
return EXPP_ReturnPyObjError( PyExc_TypeError,
|
||||
"expected a string" );
|
||||
@@ -941,11 +941,14 @@ PyObject *M_Text3d_LoadFont( PyObject * self, PyObject * args )
|
||||
if( !PyArg_ParseTuple( args, "s", &fontfile ) )
|
||||
return EXPP_ReturnPyObjError( PyExc_TypeError,
|
||||
"expected a string" );
|
||||
if( vf= exist_vfont(fontfile) )
|
||||
vf= exist_vfont(fontfile);
|
||||
if( vf )
|
||||
return Font_CreatePyObject( vf );
|
||||
/* return EXPP_incr_ret( Py_None ); */
|
||||
else
|
||||
/* No use for that -- lukep
|
||||
else
|
||||
vf= NULL;
|
||||
*/
|
||||
file= fopen( fontfile, "r");
|
||||
|
||||
if( file || !strcmp (fontfile, "<builtin>") ) {
|
||||
|
||||
Reference in New Issue
Block a user