fixing warnings
This commit is contained in:
parent
e74cddfbd1
commit
c22dcb04af
@ -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_types.h"
|
||||||
#include "pyopencv_generated_funcs.h"
|
#include "pyopencv_generated_funcs.h"
|
||||||
|
|
||||||
static PyMethodDef methods[] = {
|
static PyMethodDef special_methods[] = {
|
||||||
{"createTrackbar", pycvCreateTrackbar, METH_VARARGS, "createTrackbar(trackbarName, windowName, value, count, onChange) -> None"},
|
{"createTrackbar", pycvCreateTrackbar, METH_VARARGS, "createTrackbar(trackbarName, windowName, value, count, onChange) -> None"},
|
||||||
{"setMouseCallback", (PyCFunction)pycvSetMouseCallback, METH_VARARGS | METH_KEYWORDS, "setMouseCallback(windowName, onMouse [, param]) -> None"},
|
{"setMouseCallback", (PyCFunction)pycvSetMouseCallback, METH_VARARGS | METH_KEYWORDS, "setMouseCallback(windowName, onMouse [, param]) -> None"},
|
||||||
{NULL, NULL},
|
{NULL, NULL},
|
||||||
@ -1266,7 +1266,7 @@ static struct PyModuleDef cv2_moduledef =
|
|||||||
"Python wrapper for OpenCV.",
|
"Python wrapper for OpenCV.",
|
||||||
-1, /* size of per-interpreter state of the module,
|
-1, /* size of per-interpreter state of the module,
|
||||||
or -1 if the module keeps state in global variables. */
|
or -1 if the module keeps state in global variables. */
|
||||||
methods
|
special_methods
|
||||||
};
|
};
|
||||||
|
|
||||||
PyObject* PyInit_cv2()
|
PyObject* PyInit_cv2()
|
||||||
@ -1283,7 +1283,7 @@ void initcv2()
|
|||||||
#if PY_MAJOR_VERSION >= 3
|
#if PY_MAJOR_VERSION >= 3
|
||||||
PyObject* m = PyModule_Create(&cv2_moduledef);
|
PyObject* m = PyModule_Create(&cv2_moduledef);
|
||||||
#else
|
#else
|
||||||
PyObject* m = Py_InitModule(MODULESTR, methods);
|
PyObject* m = Py_InitModule(MODULESTR, special_methods);
|
||||||
#endif
|
#endif
|
||||||
init_submodules(m); // from "pyopencv_generated_ns_reg.h"
|
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)
|
self.code_ns_reg.write('static ConstDef consts_%s[] = {\n'%wname)
|
||||||
for name, cname in sorted(ns.consts.items()):
|
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')
|
self.code_ns_reg.write(' {NULL, NULL}\n};\n\n')
|
||||||
|
|
||||||
def gen_namespaces_reg(self):
|
def gen_namespaces_reg(self):
|
||||||
|
@ -883,4 +883,3 @@ if __name__ == '__main__':
|
|||||||
parser.print_decls(decls)
|
parser.print_decls(decls)
|
||||||
print(len(decls))
|
print(len(decls))
|
||||||
print("namespaces:", " ".join(sorted(parser.namespaces)))
|
print("namespaces:", " ".join(sorted(parser.namespaces)))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user