[Bf-blender-cvs] [f04fb59] temp-python-bgl: Get bgl building with strict warnings
Campbell Barton
noreply at git.blender.org
Thu Jul 23 23:04:00 CEST 2015
Commit: f04fb595c2a67ab9728b895bd8aa5d88a0f2a959
Author: Campbell Barton
Date: Fri Jul 24 06:40:34 2015 +1000
Branches: temp-python-bgl
https://developer.blender.org/rBf04fb595c2a67ab9728b895bd8aa5d88a0f2a959
Get bgl building with strict warnings
===================================================================
M source/blender/python/generic/bgl.c
===================================================================
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c
index b50d6b6..8657d4f 100644
--- a/source/blender/python/generic/bgl.c
+++ b/source/blender/python/generic/bgl.c
@@ -32,11 +32,13 @@
#include <Python.h>
-#include "bgl.h" /*This must come first */
+#include "BLI_utildefines.h"
+
#include "GPU_glew.h"
#include "MEM_guardedalloc.h"
-#include "BLI_utildefines.h"
+#include "bgl.h"
+#include "../BPY_extern.h"
static PyObject *Buffer_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
static PyObject *Method_ShaderSource(PyObject *self, PyObject *args);
@@ -1260,7 +1262,9 @@ void BGL_disable_deprecated(void)
PyObject *BPyInit_bgl(void)
{
PyObject *submodule, *dict;
- PyMethodDef* dyn_methods;
+ PyMethodDef *dyn_methods;
+ int dyn_meth_offset = 0;
+
submodule = PyModule_Create(&BGL_module_def);
dict = PyModule_GetDict(submodule);
@@ -1273,8 +1277,6 @@ PyObject *BPyInit_bgl(void)
#define BGL_NUM_DYNAMIC_METHODS 556
dyn_methods = MEM_mallocN(sizeof(PyMethodDef) * (BGL_NUM_DYNAMIC_METHODS + 1), "BGL methods");
- int dyn_meth_offset = 0;
-
#pragma GCC diagnostic ignored "-Waddress"
#define MethodAdd(func) { \
if ( gl##func != NULL) {\
More information about the Bf-blender-cvs
mailing list