Skip to content

Commit 08d302f

Browse files
committed
[[ Bug ]] Fix PointerToObjcObject
This patch fixes the use of `MCObjcObjectCreateWithId` in `PointerToObjcObject` which did not match the function definition.
1 parent 235c4f6 commit 08d302f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

libscript/src/objc.lcb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ end handler
305305

306306
/****/
307307

308-
private foreign handler _MCObjcObjectCreateWithId_AsPointer(in pPointer as optional Pointer) returns ObjcObject binds to "MCObjcObjectCreateWithId"
308+
private foreign handler _MCObjcObjectCreateWithId_AsPointer(in pPointer as optional Pointer, out rObject as ObjcObject) returns CBool binds to "MCObjcObjectCreateWithId"
309309
private foreign handler _MCObjcObjectGetId_AsPointer(in pObject as ObjcObject) returns optional Pointer binds to "MCObjcObjectGetId"
310310

311311
/**/
@@ -323,12 +323,12 @@ Description:
323323
Use <PointerToObjcObject> to convert a variable of type Pointer to one of type
324324
ObjcObject.
325325
*/
326-
public handler PointerToObjcObject(in pPointer as optional Pointer) returns ObjcObject
327-
variable tObject as ObjcObject
326+
public handler PointerToObjcObject(in pPointer as optional Pointer) returns optional ObjcObject
327+
variable tObject as optional ObjcObject
328328
unsafe
329-
put _MCObjcObjectCreateWithId_AsPointer(pPointer) into tObject
329+
_MCObjcObjectCreateWithId_AsPointer(pPointer, tObject)
330330
end unsafe
331-
return tObject
331+
return tObject
332332
end handler
333333

334334
/**

0 commit comments

Comments
 (0)