Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generator change: keep Objective-C type when parameter is a pointer to a pointer #234

Closed
programmingkidx opened this issue Dec 8, 2023 · 1 comment

Comments

@programmingkidx
Copy link
Contributor

In Objective-C a method's parameter can be used to return information. This information could be anything from error info to an array of objects. Because of the complexity of the translation system, using a Go type to return this information will probably not work. I suggest a new rule be implemented in the generator that prevents the translation of an Objective-C type to a Go type when the parameter is a pointer to a pointer.

Examples of methods that would be effected by this new rule:

- NSNib's instantiateWithOwner:(id)owner topLevelObjects:(NSArray * _Nullable *)topLevelObjects
- NSFileManager's createDirectoryAtPath:(NSString *)path withIntermediateDirectories:(BOOL)createIntermediates attributes:(NSDictionary<NSFileAttributeKey, id> *)attributes error:(NSError * _Nullable *)error
- NSURLConnection's sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NSURLResponse * _Nullable *)response error:(NSError * _Nullable *)error;
- IOUSBHostPipe's sendControlRequest:(IOUSBDeviceRequest)request error:(NSError * _Nullable *)error;
@programmingkidx
Copy link
Contributor Author

Implemented this pull request for resolving this issue: #244

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants