warning fixes

This commit is contained in:
2011-09-09 13:46:47 +00:00
parent 8c1b4f8e05
commit 5fc9baa962

View File

@@ -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));