@@ -612,14 +612,14 @@ void close_keepers( Universe* U, lua_State* L)
612612 // free the keeper bookkeeping structure
613613 {
614614 // don't hijack the state allocator when running LuaJIT because it looks like LuaJIT does not expect it and might invalidate the memory unexpectedly
615- #if LUAJIT_FLAVOR == 0
615+ #if USE_LUA_STATE_ALLOCATOR
616616 {
617617 AllocatorDefinition * const allocD = & U -> protected_allocator .definition ;
618- allocD -> allocF ( allocUD , U -> keepers , sizeof ( Keepers ) + (nbKeepers - 1 ) * sizeof ( Keeper ), 0 );
618+ allocD -> allocF ( allocD -> allocUD , U -> keepers , sizeof ( Keepers ) + (nbKeepers - 1 ) * sizeof ( Keeper ), 0 );
619619 }
620- #else // LUAJIT_FLAVOR
620+ #else // USE_LUA_STATE_ALLOCATOR
621621 free (U -> keepers );
622- #endif // LUAJIT_FLAVOR
622+ #endif // USE_LUA_STATE_ALLOCATOR
623623 U -> keepers = NULL ;
624624 }
625625 }
@@ -654,14 +654,14 @@ void init_keepers( Universe* U, lua_State* L)
654654 {
655655 size_t const bytes = sizeof ( Keepers ) + (nb_keepers - 1 ) * sizeof ( Keeper );
656656 // don't hijack the state allocator when running LuaJIT because it looks like LuaJIT does not expect it and might invalidate the memory unexpectedly
657- #if LUAJIT_FLAVOR == 0
657+ #if USE_LUA_STATE_ALLOCATOR
658658 {
659659 AllocatorDefinition * const allocD = & U -> protected_allocator .definition ;
660- U -> keepers = (Keepers * ) allocD -> allocF ( allocUD , NULL , 0 , bytes );
660+ U -> keepers = (Keepers * ) allocD -> allocF ( allocD -> allocUD , NULL , 0 , bytes );
661661 }
662- #else // LUAJIT_FLAVOR
662+ #else // USE_LUA_STATE_ALLOCATOR
663663 U -> keepers = (Keepers * )malloc (bytes );
664- #endif // LUAJIT_FLAVOR
664+ #endif // USE_LUA_STATE_ALLOCATOR
665665 if ( U -> keepers == NULL )
666666 {
667667 (void ) luaL_error ( L , "init_keepers() failed while creating keeper array; out of memory" );
0 commit comments