Commit c22dcb04 authored by Alexander Mordvintsev's avatar Alexander Mordvintsev

fixing warnings

parent e74cddfb
......@@ -1192,7 +1192,7 @@ static int convert_to_char(PyObject *o, char *dst, const char *name = "no_name")
#include "pyopencv_generated_types.h"
#include "pyopencv_generated_funcs.h"
static PyMethodDef methods[] = {
static PyMethodDef special_methods[] = {
{"createTrackbar", pycvCreateTrackbar, METH_VARARGS, "createTrackbar(trackbarName, windowName, value, count, onChange) -> None"},
{"setMouseCallback", (PyCFunction)pycvSetMouseCallback, METH_VARARGS | METH_KEYWORDS, "setMouseCallback(windowName, onMouse [, param]) -> None"},
{NULL, NULL},
......@@ -1266,7 +1266,7 @@ static struct PyModuleDef cv2_moduledef =
"Python wrapper for OpenCV.",
-1, /* size of per-interpreter state of the module,
or -1 if the module keeps state in global variables. */
methods
special_methods
};
PyObject* PyInit_cv2()
......@@ -1283,7 +1283,7 @@ void initcv2()
#if PY_MAJOR_VERSION >= 3
PyObject* m = PyModule_Create(&cv2_moduledef);
#else
PyObject* m = Py_InitModule(MODULESTR, methods);
PyObject* m = Py_InitModule(MODULESTR, special_methods);
#endif
init_submodules(m); // from "pyopencv_generated_ns_reg.h"
......
......@@ -821,7 +821,7 @@ class PythonWrapperGenerator(object):
self.code_ns_reg.write('static ConstDef consts_%s[] = {\n'%wname)
for name, cname in sorted(ns.consts.items()):
self.code_ns_reg.write(' {"%s", %s},\n'%(name, cname))
self.code_ns_reg.write(' {"%s", (long)(%s)},\n'%(name, cname))
self.code_ns_reg.write(' {NULL, NULL}\n};\n\n')
def gen_namespaces_reg(self):
......
......@@ -883,4 +883,3 @@ if __name__ == '__main__':
parser.print_decls(decls)
print(len(decls))
print("namespaces:", " ".join(sorted(parser.namespaces)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment