Skip to content

Commit

Permalink
refactor: a bit more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
NSEcho committed Feb 14, 2025
1 parent b2ada81 commit ac273e0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,13 @@ const xpc_type_uint64 = getPtr("_xpc_type_uint64");
const xpc_type_uuid = getPtr("_xpc_type_uuid");

// check which version of decoder we have
var NSXPCDecoderDecodeMethod = null;
var NSXPCDecoderDecodeMethod = "old"
var connResult = null;

var decoder = NSXPCDecoder.alloc().init();

if ((connResult = decoder["- setConnection:"]) != null) {
NSXPCDecoderDecodeMethod = "new";
} else {
NSXPCDecoderDecodeMethod = "old";
}

// helper function that will create new NativeFunction
Expand Down

0 comments on commit ac273e0

Please sign in to comment.