Skip to content

fix: add _ suffix to properties having reserved keyword names#22955

Merged
asmorkalov merged 1 commit intoopencv:3.4from
VadimLevin:dev/vlevin/handle-properties-with-keyword-names
Dec 14, 2022
Merged

fix: add _ suffix to properties having reserved keyword names#22955
asmorkalov merged 1 commit intoopencv:3.4from
VadimLevin:dev/vlevin/handle-properties-with-keyword-names

Conversation

@VadimLevin
Copy link
Copy Markdown
Contributor

@VadimLevin VadimLevin commented Dec 13, 2022

Fixes export of class properties having names that are reserved in Python.

Classes exported with CV_EXPORTS_W_MAP are not affected, because their properties are string literals in dict

Existing use case: cv:: TrackerKCF::Params::lambda

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@VadimLevin VadimLevin force-pushed the dev/vlevin/handle-properties-with-keyword-names branch from 01e3a4c to 3f5f09e Compare December 13, 2022 17:57
Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@asmorkalov asmorkalov merged commit aff3758 into opencv:3.4 Dec 14, 2022
@alalek alalek mentioned this pull request Dec 18, 2022
@alalek alalek mentioned this pull request Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants