comparison src/if_lua.c @ 33531:1a769647d661

patch 9.0.2013: confusing ifdefs in if_<lang>.c Commit: https://github.com/vim/vim/commit/c97b3febc82c1ccacf5f328ed0bd81c8b850e97d Author: Ken Takata <kentkt@csc.jp> Date: Wed Oct 11 21:27:06 2023 +0200 patch 9.0.2013: confusing ifdefs in if_<lang>.c Problem: confusing ifdefs in if_<lang>.c Solution: refactor ifndefs to #ifdefs if_x: Avoid using #ifndef - #else - #endif Using #ifndef - #else - #endif is sometimes confusing. Use #ifdef - #else - #endif instead. closes: #13310 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Ken Takata <kentkt@csc.jp>
author Christian Brabandt <cb@256bit.org>
date Wed, 11 Oct 2023 21:30:11 +0200
parents 441ceb1c45c1
children daaff6843090
comparison
equal deleted inserted replaced
33530:17619194b11f 33531:1a769647d661
100 #define luaV_register(L, l) luaL_setfuncs(L, l, 0) 100 #define luaV_register(L, l) luaL_setfuncs(L, l, 0)
101 #endif 101 #endif
102 102
103 #ifdef DYNAMIC_LUA 103 #ifdef DYNAMIC_LUA
104 104
105 #ifndef MSWIN 105 #ifdef MSWIN
106 # define load_dll vimLoadLib
107 # define symbol_from_dll GetProcAddress
108 # define close_dll FreeLibrary
109 # define load_dll_error GetWin32Error
110 #else
106 # include <dlfcn.h> 111 # include <dlfcn.h>
107 # define HANDLE void* 112 # define HANDLE void*
108 # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL) 113 # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
109 # define symbol_from_dll dlsym 114 # define symbol_from_dll dlsym
110 # define close_dll dlclose 115 # define close_dll dlclose
111 # define load_dll_error dlerror 116 # define load_dll_error dlerror
112 #else
113 # define load_dll vimLoadLib
114 # define symbol_from_dll GetProcAddress
115 # define close_dll FreeLibrary
116 # define load_dll_error GetWin32Error
117 #endif 117 #endif
118 118
119 // lauxlib 119 // lauxlib
120 #if LUA_VERSION_NUM <= 501 120 #if LUA_VERSION_NUM <= 501
121 #define luaL_register dll_luaL_register 121 #define luaL_register dll_luaL_register