summaryrefslogtreecommitdiffstats
path: root/src/if_tcl.c
diff options
context:
space:
mode:
authorKen Takata <kentkt@csc.jp>2023-10-11 21:27:06 +0200
committerChristian Brabandt <cb@256bit.org>2023-10-11 21:27:06 +0200
commitc97b3febc82c1ccacf5f328ed0bd81c8b850e97d (patch)
tree8ab62fd87ed25bcfdc8c5394a7b104876f7f948a /src/if_tcl.c
parenta634b92b969e1bcb47551a39bf4e11e41ba9aa17 (diff)
patch 9.0.2013: confusing ifdefs in if_<lang>.cv9.0.2014
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>
Diffstat (limited to 'src/if_tcl.c')
-rw-r--r--src/if_tcl.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/if_tcl.c b/src/if_tcl.c
index 1882b41113..d3d46395ec 100644
--- a/src/if_tcl.c
+++ b/src/if_tcl.c
@@ -160,7 +160,13 @@ static struct ref refsdeleted; // dummy object for deleted ref list
typedef int HANDLE;
# endif
-# ifndef MSWIN
+# ifdef MSWIN
+# define TCL_PROC FARPROC
+# define load_dll vimLoadLib
+# define symbol_from_dll GetProcAddress
+# define close_dll FreeLibrary
+# define load_dll_error GetWin32Error
+# else
# include <dlfcn.h>
# define HANDLE void*
# define TCL_PROC void*
@@ -168,12 +174,6 @@ typedef int HANDLE;
# define symbol_from_dll dlsym
# define close_dll dlclose
# define load_dll_error dlerror
-# else
-# define TCL_PROC FARPROC
-# define load_dll vimLoadLib
-# define symbol_from_dll GetProcAddress
-# define close_dll FreeLibrary
-# define load_dll_error GetWin32Error
# endif
/*
@@ -242,10 +242,10 @@ static char *find_executable_arg = NULL;
void
vim_tcl_init(char *arg)
{
-#ifndef DYNAMIC_TCL
- Tcl_FindExecutable(arg);
-#else
+#ifdef DYNAMIC_TCL
find_executable_arg = arg;
+#else
+ Tcl_FindExecutable(arg);
#endif
}