diff options
Diffstat (limited to 'source/blender/python/intern/gpu.c')
-rw-r--r-- | source/blender/python/intern/gpu.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/python/intern/gpu.c b/source/blender/python/intern/gpu.c index 7a798d7d579..8d705e44bb8 100644 --- a/source/blender/python/intern/gpu.c +++ b/source/blender/python/intern/gpu.c @@ -47,7 +47,10 @@ #include "DNA_object_types.h" #include "DNA_ID.h" #include "DNA_customdata_types.h" + #include "BLI_listbase.h" +#include "BLI_utildefines.h" + #include "RNA_access.h" #include "bpy_rna.h" @@ -138,7 +141,7 @@ PyInit_gpu(void) PyObject_SetAttrString(d, #f, val); \ Py_DECREF(val) -static PyObject* GPU_export_shader(PyObject* self, PyObject *args, PyObject *kwds) +static PyObject* GPU_export_shader(PyObject* UNUSED(self), PyObject *args, PyObject *kwds) { PyObject* pyscene; PyObject* pymat; @@ -238,7 +241,7 @@ static PyObject* GPU_export_shader(PyObject* self, PyObject *args, PyObject *kwd PY_DICT_ADD_LONG(dict,uniform,texnumber); } if (uniform->texpixels) { - val = PyByteArray_FromStringAndSize(uniform->texpixels, uniform->texsize); + val = PyByteArray_FromStringAndSize((const char *)uniform->texpixels, uniform->texsize); PyDict_SetItemString(dict, "texpixels", val); Py_DECREF(val); PY_DICT_ADD_LONG(dict,uniform,texsize); @@ -280,7 +283,7 @@ static PyMethodDef meth_export_shader[] = {{ "export_shader", (PyCFunction)GPU_e ":return: Dictionary defining the shader, uniforms and attributes.\n" ":rtype: Dict"}}; -PyObject* GPU_initPython() +PyObject* GPU_initPython(void) { PyObject* module = PyInit_gpu(); PyModule_AddObject(module, "export_shader", (PyObject *)PyCFunction_New(meth_export_shader, NULL)); |