Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
fix: Accepting of out params wasn't using a double pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
breautek committed Sep 20, 2024
1 parent 8eeb058 commit ede095a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions BTFuse/BTFuse/BTFuseAPIPacket.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ limitations under the License.
Reads the packet as a JSON/Dictionary object.
Do not call on the main thread.
*/
- (NSDictionary*) readAsJSONObject:(NSError*) error;
- (NSDictionary*) readAsJSONObject:(NSError**) error;

/**
Reads the packet as an array.
Do not call on the main thread.
*/
- (NSArray*) readAsJSONArray:(NSError*) error;
- (NSArray*) readAsJSONArray:(NSError**) error;

@end

Expand Down
8 changes: 4 additions & 4 deletions BTFuse/src/BTFuseAPIPacket.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ - (NSData*) readAsBinary {
return data;
}

- (NSDictionary*) readAsJSONObject:(NSError*) error {
- (NSDictionary*) readAsJSONObject:(NSError**) error {
NSData* data = [self readAsBinary];
return [NSJSONSerialization JSONObjectWithData: data options:NSJSONReadingMutableContainers error: &error];
return [NSJSONSerialization JSONObjectWithData: data options:NSJSONReadingMutableContainers error: error];
}

- (NSArray*) readAsJSONArray:(NSError*) error {
- (NSArray*) readAsJSONArray:(NSError**) error {
NSData* data = [self readAsBinary];
return [NSJSONSerialization JSONObjectWithData: data options:NSJSONReadingMutableContainers error: &error];
return [NSJSONSerialization JSONObjectWithData: data options:NSJSONReadingMutableContainers error: error];
}

@end

0 comments on commit ede095a

Please sign in to comment.