From c97b3febc82c1ccacf5f328ed0bd81c8b850e97d Mon Sep 17 00:00:00 2001 From: Ken Takata Date: Wed, 11 Oct 2023 21:27:06 +0200 Subject: patch 9.0.2013: confusing ifdefs in if_.c Problem: confusing ifdefs in if_.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 Co-authored-by: Ken Takata --- src/if_perl.xs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/if_perl.xs') diff --git a/src/if_perl.xs b/src/if_perl.xs index 180fce64c4..312262ae3f 100644 --- a/src/if_perl.xs +++ b/src/if_perl.xs @@ -166,7 +166,13 @@ typedef int XSUBADDR_t; typedef int perl_key; # endif -# ifndef MSWIN +# ifdef MSWIN +# define PERL_PROC FARPROC +# define load_dll vimLoadLib +# define symbol_from_dll GetProcAddress +# define close_dll FreeLibrary +# define load_dll_error GetWin32Error +# else # include # define HANDLE void* # define PERL_PROC void* @@ -174,12 +180,6 @@ typedef int perl_key; # define symbol_from_dll dlsym # define close_dll dlclose # define load_dll_error dlerror -# else -# define PERL_PROC FARPROC -# define load_dll vimLoadLib -# define symbol_from_dll GetProcAddress -# define close_dll FreeLibrary -# define load_dll_error GetWin32Error # endif /* * Wrapper defines -- cgit v1.2.3