From e4ff0eb6a5260f0a743645d28f4a0a5aee473c2a Mon Sep 17 00:00:00 2001 From: Joey Bar Date: Mon, 9 Dec 2024 15:46:11 +0200 Subject: [PATCH] Remove unsafe from some vision framework functions --- .../objc2-vision/translation-config.toml | 27 +++++++++++++++++++ generated | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/framework-crates/objc2-vision/translation-config.toml b/framework-crates/objc2-vision/translation-config.toml index d86f904ad..1a55260a4 100644 --- a/framework-crates/objc2-vision/translation-config.toml +++ b/framework-crates/objc2-vision/translation-config.toml @@ -91,3 +91,30 @@ class.VNTargetedImageRequest.methods."initWithTargetedImageData:orientation:opti class.VNTargetedImageRequest.methods."initWithTargetedImageData:orientation:options:completionHandler:".skipped = true class.VNTargetedImageRequest.methods."initWithTargetedCMSampleBuffer:orientation:options:".skipped = true class.VNTargetedImageRequest.methods."initWithTargetedCMSampleBuffer:orientation:options:completionHandler:".skipped = true + + +### +### Safety +### + +class.VNImageRequestHandler.methods."initWithData:options:".unsafe = false +class.VNImageRequestHandler.methods."performRequests:error:".unsafe = false + +class.VNRecognizedText.methods.string.unsafe = false +class.VNRecognizedText.methods.confidence.unsafe = false + +class.VNRecognizedTextObservation.methods."topCandidates:".unsafe = false + +class.VNRecognizeTextRequest.methods.new.unsafe = false +class.VNRecognizeTextRequest.methods.results.unsafe = false +class.VNRecognizeTextRequest.methods."setRecognitionLanguages:".unsafe = false +class.VNRecognizeTextRequest.methods.usesLanguageCorrection.unsafe = false +class.VNRecognizeTextRequest.methods.customWords.unsafe = false +class.VNRecognizeTextRequest.methods."setCustomWords:".unsafe = false +class.VNRecognizeTextRequest.methods.recognitionLevel.unsafe = false +class.VNRecognizeTextRequest.methods."setRecognitionLevel:".unsafe = false +class.VNRecognizeTextRequest.methods."setUsesLanguageCorrection:".unsafe = false +class.VNRecognizeTextRequest.methods.automaticallyDetectsLanguage.unsafe = false +class.VNRecognizeTextRequest.methods."setAutomaticallyDetectsLanguage:".unsafe = false +class.VNRecognizeTextRequest.methods.minimumTextHeight.unsafe = false +class.VNRecognizeTextRequest.methods."setMinimumTextHeight:".unsafe = false diff --git a/generated b/generated index 4307f93fc..79fe5e180 160000 --- a/generated +++ b/generated @@ -1 +1 @@ -Subproject commit 4307f93fcc1b73c6d8f85dd530cbc4137e8de57a +Subproject commit 79fe5e180412b860484562ae7fbf79c3dbf4bedd