fix warnings (#207)

This commit is contained in:
Philipp Moritz
2016-07-04 15:40:56 -07:00
committed by Robert Nishihara
parent 3eeb2d315c
commit 72e1b0fcd6
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -65,8 +65,11 @@ static int PyObjRef_compare(PyObject* a, PyObject* b) {
return 0;
}
char RAY_VAL_LITERAL[] = "val";
char RAY_OBJECT_REFERENCE_LITERAL[] = "object reference";
static PyMemberDef PyObjRef_members[] = {
{"val", T_INT, offsetof(PyObjRef, val), 0, "object reference"},
{RAY_VAL_LITERAL, T_INT, offsetof(PyObjRef, val), 0, RAY_OBJECT_REFERENCE_LITERAL},
{NULL}
};
@@ -908,7 +911,8 @@ PyMODINIT_FUNC initlibraylib(void) {
m = Py_InitModule3("libraylib", RayLibMethods, "Python C Extension for Ray");
Py_INCREF(&PyObjRefType);
PyModule_AddObject(m, "ObjRef", (PyObject *)&PyObjRefType);
RayError = PyErr_NewException("ray.error", NULL, NULL);
char ray_error[] = "ray.error";
RayError = PyErr_NewException(ray_error, NULL, NULL);
Py_INCREF(RayError);
PyModule_AddObject(m, "error", RayError);
import_array();