2014-03-14 22:22:59 |
Kevin Stenerson |
description |
The Module.add_function method uses the normal name instead of the custom_name for the generated wrapper function's name.
Class.add_method handles this correctly so that if I were to call the following:
cls.add_method('get_foo', retval('int'), [])
cls.add_method('get_foo', retval('int'), [], custom_name = 'getFoo')
It produces:
_wrap_PyModulenameClassname_get_foo
_wrap_PyModulenameClassname_getFoo
However, the same thing with add_function:
mod.add_method('get_foo', retval('int'), [])
mod.add_method('get_foo', retval('int'), [], custom_name = 'getFoo')
Will produce:
_wrap_modulename_get_foo
_wrap_modulename_get_foo
and cause the error:
redefinition of ‘PyObject* _wrap_modulename_get_foo(PyObject*)’ |
The Module.add_function method uses the normal name instead of the custom_name for the generated wrapper function's name.
Class.add_method handles this correctly so that if I were to call the following:
cls.add_method('get_foo', retval('int'), [])
cls.add_method('get_foo', retval('int'), [], custom_name = 'getFoo')
It produces:
_wrap_PyModulenameClassname_get_foo
_wrap_PyModulenameClassname_getFoo
However, the same thing with add_function:
mod.add_function('get_foo', retval('int'), [])
mod.add_function('get_foo', retval('int'), [], custom_name = 'getFoo')
Will produce:
_wrap_modulename_get_foo
_wrap_modulename_get_foo
and cause the error:
redefinition of ‘PyObject* _wrap_modulename_get_foo(PyObject*)’ |
|