mirror of
https://github.com/opencv/opencv.git
synced 2026-07-25 13:23:02 +04:00
e32cab0e31
objc: fix conflicting Swift name for LightGlueMatcher.create #29257 Fixes #29256 `cv::LightGlueMatcher` (a `DescriptorMatcher` subclass) declares a static `create(const String& modelPath, ...)` overload. The Objective-C bindings generator emits it as the selector `+create:`, which is the same selector as the inherited `DescriptorMatcher::create(MatcherType)` but carries a different `swift_name`, so clang refuses to build the `opencv2` Objective-C module: ``` LightGlueMatcher.h: error: 'swift_name' and 'swift_name' attributes are not compatible ``` Wrap the file-path overload with `CV_WRAP_AS(createFromFile)` so it gets a distinct selector, mirroring the sibling `createFromMemory` overload, while keeping the Swift name `create(modelPath:...)`. ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] 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 - [x] The PR is proposed to the proper branch - [x] 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