mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-12 06:38:45 +01:00
@ -9,18 +9,18 @@ static void test(WrenVM* vm)
|
||||
{
|
||||
WrenConfiguration configuration;
|
||||
wrenInitConfiguration(&configuration);
|
||||
|
||||
|
||||
// Should default to NULL.
|
||||
if (configuration.userData != NULL)
|
||||
{
|
||||
wrenSetSlotBool(vm, 0, false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
configuration.userData = (void*)data;
|
||||
|
||||
|
||||
WrenVM* otherVM = wrenNewVM(&configuration);
|
||||
|
||||
|
||||
// Should be able to get it.
|
||||
if (wrenGetUserData(otherVM) != data)
|
||||
{
|
||||
@ -28,10 +28,10 @@ static void test(WrenVM* vm)
|
||||
wrenFreeVM(otherVM);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Should be able to set it.
|
||||
wrenSetUserData(otherVM, (void*)otherData);
|
||||
|
||||
|
||||
if (wrenGetUserData(otherVM) != otherData)
|
||||
{
|
||||
wrenSetSlotBool(vm, 0, false);
|
||||
|
||||
Reference in New Issue
Block a user