PyObject* pyobj_int abufId = NULL;
My biggest question now is, is this even valid C++ code?
I’ve taken it upon myself to begin editing the pyopencv_generated_types_content.h file
There are several instances of these lines of code:
PyObject* pyobj_asize = NULL;
Size asize;
PyObject* pyobj_atype = NULL;
int atype=0;
PyObject* pyobj_int abufId = NULL;
unsigned int abufId;
PyObject* pyobj_autoRelease = NULL;
bool autoRelease=false;
const char* keywords[] = { "asize", "atype", "int abufId", "autoRelease", NULL };
if( PyArg_ParseTupleAndKeywords(py_args, kw, "OOO|O:Buffer", (char**)keywords, &pyobj_asize, &pyobj_atype, &pyobj_int abufId, &pyobj_autoRelease) &&
pyopencv_to_safe(pyobj_asize, asize, ArgInfo("asize", 0)) &&
pyopencv_to_safe(pyobj_atype, atype, ArgInfo("atype", 0)) &&
pyopencv_to_safe(pyobj_int abufId, int abufId, ArgInfo("int abufId", 0)) &&
pyopencv_to_safe(pyobj_autoRelease, autoRelease, ArgInfo("autoRelease", 0)) )
{
new (&(self->v)) Ptr<cv::ogl::Buffer>(); // init Ptr with placement new
if(self) ERRWRAP2(self->v.reset(new cv::ogl::Buffer(asize, atype, int abufId, autoRelease)));
return 0;
}
I have edited them so that int abufId
becomes either int_abufId
or abufId
, like so:
PyObject* pyobj_asize = NULL;
Size asize;
PyObject* pyobj_atype = NULL;
int atype=0;
PyObject* pyobj_int_abufId = NULL;
unsigned int abufId;
PyObject* pyobj_autoRelease = NULL;
bool autoRelease=false;
const char* keywords[] = { "asize", "atype", "int abufId", "autoRelease", NULL };
if( PyArg_ParseTupleAndKeywords(py_args, kw, "OOO|O:Buffer", (char**)keywords, &pyobj_asize, &pyobj_atype, &pyobj_int_abufId, &pyobj_autoRelease) &&
pyopencv_to_safe(pyobj_asize, asize, ArgInfo("asize", 0)) &&
pyopencv_to_safe(pyobj_atype, atype, ArgInfo("atype", 0)) &&
pyopencv_to_safe(pyobj_int_abufId, abufId, ArgInfo("int abufId", 0)) &&
pyopencv_to_safe(pyobj_autoRelease, autoRelease, ArgInfo("autoRelease", 0)) )
{
new (&(self->v)) Ptr<cv::ogl::Buffer>(); // init Ptr with placement new
if(self) ERRWRAP2(self->v.reset(new cv::ogl::Buffer(asize, atype, abufId, autoRelease)));
return 0;
}