Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit ab79f4c

Browse files
committed
[[ Script ]] Use correct custom pointer type for ffi layouts
This patch ensure a MCAutoCustomPointer is used for an array allocated with MCMemoryAllocate, passing the MCMemoryDeallocate drop function.
1 parent a7085e9 commit ab79f4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libscript/src/script-instance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ __MCScriptResolveForeignFunctionBindingForObjC(MCScriptInstanceRef p_instance,
10661066
}
10671067

10681068
/* Next we must compute the cif. */
1069-
MCAutoPointer<void> t_layout_cif;
1069+
MCAutoCustomPointer<void, MCMemoryDeallocate> t_layout_cif;
10701070
ffi_cif *t_cif = nullptr;
10711071
ffi_type *t_cif_return_type = nullptr;
10721072
ffi_type **t_cif_arg_types = nullptr;

0 commit comments

Comments
 (0)