* Added 'extern' to PyTypeObject declarations in some headers.
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
#include "gen_utils.h"
|
||||
|
||||
/* The Camera PyType Object defined in Camera.c */
|
||||
PyTypeObject Camera_Type;
|
||||
extern PyTypeObject Camera_Type;
|
||||
|
||||
#define BPy_Camera_Check(v) \
|
||||
((v)->ob_type == &Camera_Type) /* for type checking */
|
||||
|
@@ -115,16 +115,15 @@ static void exit_pydraw(SpaceText *st)
|
||||
static void exec_callback(SpaceText *st, PyObject *callback, PyObject *args)
|
||||
{
|
||||
PyObject *result = PyObject_CallObject (callback, args);
|
||||
printf ("In exec_callback\n");
|
||||
if (result==NULL) {
|
||||
printf("In exec_callback, result == NULL\n");
|
||||
st->text->compiled= NULL;
|
||||
PyErr_Print();
|
||||
exit_pydraw(st);
|
||||
|
||||
if (result == NULL) {
|
||||
st->text->compiled = NULL;
|
||||
PyErr_Print ();
|
||||
exit_pydraw (st);
|
||||
}
|
||||
printf ("In exec_callback 2\n");
|
||||
Py_XDECREF(result);
|
||||
Py_DECREF(args);
|
||||
|
||||
Py_XDECREF (result);
|
||||
Py_DECREF (args);
|
||||
}
|
||||
|
||||
/* BPY_spacetext_do_pywin_draw, the static spacetext_do_pywin_buttons and
|
||||
@@ -165,7 +164,7 @@ static void spacetext_do_pywin_buttons(SpaceText *st, unsigned short event)
|
||||
|
||||
void BPY_spacetext_do_pywin_event(SpaceText *st, unsigned short event, short val)
|
||||
{
|
||||
if (event==QKEY && G.qual & (LR_ALTKEY|LR_CTRLKEY|LR_SHIFTKEY)) {
|
||||
if (event == QKEY && G.qual & (LR_ALTKEY|LR_CTRLKEY|LR_SHIFTKEY)) {
|
||||
exit_pydraw(st);
|
||||
return;
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@ typedef struct {
|
||||
|
||||
} C_Image;
|
||||
|
||||
PyTypeObject Image_Type; /* The Image PyType Object */
|
||||
extern PyTypeObject Image_Type; /* The Image PyType Object */
|
||||
|
||||
#define C_Image_Check(v) ((v)->ob_type == &Image_Type) /* for type checking */
|
||||
|
||||
|
@@ -48,7 +48,7 @@ typedef struct {
|
||||
|
||||
} C_Material;
|
||||
|
||||
PyTypeObject Material_Type; /* The Material PyType Object */
|
||||
extern PyTypeObject Material_Type; /* The Material PyType Object */
|
||||
|
||||
#define C_Material_Check(v) \
|
||||
((v)->ob_type == &Material_Type) /* for type checking */
|
||||
|
@@ -57,7 +57,7 @@
|
||||
#include "modules.h"
|
||||
|
||||
/* The Object PyType Object defined in Object.c */
|
||||
PyTypeObject Object_Type;
|
||||
extern PyTypeObject Object_Type;
|
||||
|
||||
#define C_Object_Check(v) \
|
||||
((v)->ob_type == &Object_Type) /* for type checking */
|
||||
|
Reference in New Issue
Block a user