1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

fix: submodules creation and registration

- Add special case handling when submodule has the same name as parent
- `PyDict_SetItemString` doesn't steal reference, so reference count
  should be explicitly decremented to transfer object life-time
  ownership
- Add sanity checks for module registration input
- Add Python 2 and Python 3 reference counting handling
This commit is contained in:
Vadim Levin
2022-01-19 00:07:50 +03:00
parent 6ae8103022
commit d88730685e
3 changed files with 200 additions and 36 deletions
@@ -219,6 +219,12 @@ AsyncArray testAsyncException()
return p.getArrayResult();
}
namespace nested {
CV_WRAP static inline bool testEchoBooleanFunction(bool flag) {
return flag;
}
} // namespace nested
namespace fs {
CV_EXPORTS_W cv::String getCacheDirectoryForDownloads();
} // namespace fs