Added cmake switch to enable limited python API (stage 3)#14736
Merged
opencv-pushbot merged 1 commit intoopencv:3.4from Jun 11, 2019
Merged
Added cmake switch to enable limited python API (stage 3)#14736opencv-pushbot merged 1 commit intoopencv:3.4from
opencv-pushbot merged 1 commit intoopencv:3.4from
Conversation
5f7548a to
f4093d0
Compare
alalek
reviewed
Jun 11, 2019
| static PyObject* pyopencv_##NAME##_repr(PyObject* self) \ | ||
| { \ | ||
| char str[1000]; \ | ||
| sprintf(str, "<"#NAME" %p>", self); \ |
| // Debug module load: | ||
| // | ||
| // else \ | ||
| // { \ |
|
|
||
| template<> | ||
| bool pyopencv_to(PyObject* obj, String& value, const char* name) | ||
| bool pyopencv_to(PyObject* obj, String &value, const char* name) |
Member
There was a problem hiding this comment.
BTW, What coding style binds reference & symbol to variable name instead of type? In case of return value type?
|
|
||
| gen_template_check_self_algo = Template(""" $cname* _self_ = NULL; | ||
| if(PyObject_TypeCheck(self, &pyopencv_${name}_Type)) | ||
| _self_ = dynamic_cast<$cname*>(${amp}((pyopencv_${name}_t*)self)->v.get()); |
Member
There was a problem hiding this comment.
Does TypeCheck() allows to drop dynamic_cast completely?
| ${cname} * dst_; | ||
| if (pyopencv_${name}_getp(src, dst_)) | ||
| { | ||
| dst = ((pyopencv_${name}_t*)src)->v.dynamicCast<${cname}>(); |
Member
There was a problem hiding this comment.
the same note about dynamic_cast
5928488 to
10d61a2
Compare
alalek
approved these changes
Jun 11, 2019
opencv-pushbot
pushed a commit
that referenced
this pull request
Jun 11, 2019
Merged
6 tasks
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #14428 and #14120
This pullrequest changes
cmake option "PYTHON3_LIMITED_API" will enable limited API
Details: PEP-0384