diff options
Diffstat (limited to 'src/linda.c')
-rw-r--r-- | src/linda.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/linda.c b/src/linda.c index 4149e71..42cda51 100644 --- a/src/linda.c +++ b/src/linda.c | |||
@@ -795,16 +795,16 @@ static void* linda_id( lua_State* L, DeepOp op_) | |||
795 | * just don't use L's allocF because we don't know which state will get the honor of GCing the linda | 795 | * just don't use L's allocF because we don't know which state will get the honor of GCing the linda |
796 | */ | 796 | */ |
797 | // don't hijack the state allocator when running LuaJIT because it looks like LuaJIT does not expect it and might invalidate the memory unexpectedly | 797 | // don't hijack the state allocator when running LuaJIT because it looks like LuaJIT does not expect it and might invalidate the memory unexpectedly |
798 | #if LUAJIT_FLAVOR == 0 | 798 | #if USE_LUA_STATE_ALLOCATOR |
799 | { | 799 | { |
800 | Universe* const U = universe_get(L); | 800 | Universe* const U = universe_get(L); |
801 | AllocatorDefinition* const allocD = &U->protected_allocator.definition; | 801 | AllocatorDefinition* const allocD = &U->protected_allocator.definition; |
802 | 802 | ||
803 | s = (struct s_Linda*)allocD->allocF(allocD->allocUD, NULL, 0, sizeof(struct s_Linda) + name_len); // terminating 0 is already included | 803 | s = (struct s_Linda*)allocD->allocF(allocD->allocUD, NULL, 0, sizeof(struct s_Linda) + name_len); // terminating 0 is already included |
804 | } | 804 | } |
805 | #else // LUAJIT_FLAVOR | 805 | #else // USE_LUA_STATE_ALLOCATOR |
806 | s = (struct s_Linda*)malloc(sizeof(struct s_Linda) + name_len); // terminating 0 is already included | 806 | s = (struct s_Linda*)malloc(sizeof(struct s_Linda) + name_len); // terminating 0 is already included |
807 | #endif // LUAJIT_FLAVOR | 807 | #endif // USE_LUA_STATE_ALLOCATOR |
808 | if( s) | 808 | if( s) |
809 | { | 809 | { |
810 | s->prelude.magic.value = DEEP_VERSION.value; | 810 | s->prelude.magic.value = DEEP_VERSION.value; |
@@ -838,16 +838,16 @@ static void* linda_id( lua_State* L, DeepOp op_) | |||
838 | SIGNAL_FREE( &linda->read_happened); | 838 | SIGNAL_FREE( &linda->read_happened); |
839 | SIGNAL_FREE( &linda->write_happened); | 839 | SIGNAL_FREE( &linda->write_happened); |
840 | // don't hijack the state allocator when running LuaJIT because it looks like LuaJIT does not expect it and might invalidate the memory unexpectedly | 840 | // don't hijack the state allocator when running LuaJIT because it looks like LuaJIT does not expect it and might invalidate the memory unexpectedly |
841 | #if LUAJIT_FLAVOR == 0 | 841 | #if USE_LUA_STATE_ALLOCATOR |
842 | { | 842 | { |
843 | Universe* const U = universe_get(L); | 843 | Universe* const U = universe_get(L); |
844 | AllocatorDefinition* const allocD = &U->protected_allocator.definition; | 844 | AllocatorDefinition* const allocD = &U->protected_allocator.definition; |
845 | 845 | ||
846 | allocD->allocF(allocD->allocUD, linda, sizeof(struct s_Linda) + strlen(linda->name), 0); | 846 | allocD->allocF(allocD->allocUD, linda, sizeof(struct s_Linda) + strlen(linda->name), 0); |
847 | } | 847 | } |
848 | #else // LUAJIT_FLAVOR | 848 | #else // USE_LUA_STATE_ALLOCATOR |
849 | free(linda); | 849 | free(linda); |
850 | #endif // LUAJIT_FLAVOR | 850 | #endif // USE_LUA_STATE_ALLOCATOR |
851 | return NULL; | 851 | return NULL; |
852 | } | 852 | } |
853 | 853 | ||