[jffi-next] 06/24: Better _WIN64 ifdefs.
Tim Potter
tpot-guest at moszumanska.debian.org
Wed Mar 4 04:51:29 UTC 2015
This is an automated email from the git hooks/post-receive script.
tpot-guest pushed a commit to tag 0.6.5
in repository jffi-next.
commit d7246c1b0888e5151798280446f8166fb396f1ca
Author: Vladimir Sizikov <vsizikov at gmail.com>
Date: Tue Dec 15 11:02:05 2009 +0100
Better _WIN64 ifdefs.
---
jni/jffi/Closure.c | 5 +++--
jni/jffi/Function.c | 10 +++-------
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/jni/jffi/Closure.c b/jni/jffi/Closure.c
index dde877b..dd81166 100644
--- a/jni/jffi/Closure.c
+++ b/jni/jffi/Closure.c
@@ -116,8 +116,9 @@ Java_com_kenai_jffi_Foreign_newClosure(JNIEnv* env, jclass clazz,
goto cleanup;
}
-#ifdef _WIN32
- abi = (flags & com_kenai_jffi_Foreign_F_STDCALL) ? FFI_STDCALL : FFI_DEFAULT_ABI;
+// Win64 doesn't have STDCALL calling convention
+#if defined(_WIN32) && !defined(_WIN64)
+ abi = (flags & com_kenai_jffi_Foreign_F_STDCALL) != 0 ? FFI_STDCALL : FFI_DEFAULT_ABI;
#else
abi = FFI_DEFAULT_ABI;
#endif
diff --git a/jni/jffi/Function.c b/jni/jffi/Function.c
index 80eaaa5..21c4a88 100644
--- a/jni/jffi/Function.c
+++ b/jni/jffi/Function.c
@@ -70,13 +70,9 @@ Java_com_kenai_jffi_Foreign_newFunction(JNIEnv* env, jobject self,
ctx->rawParamOffsets[i] = rawOffset;
rawOffset += FFI_ALIGN(type->size, FFI_SIZEOF_ARG);
}
-#ifdef _WIN32
- #ifdef _WIN64
- // Win64 doesn't have STDCALL calling convention
- abi = FFI_DEFAULT_ABI;
- # else
- abi = (flags & com_kenai_jffi_Foreign_F_STDCALL) != 0 ? FFI_STDCALL : FFI_DEFAULT_ABI;
- #endif
+// Win64 doesn't have STDCALL calling convention
+#if defined(_WIN32) && !defined(_WIN64)
+ abi = (flags & com_kenai_jffi_Foreign_F_STDCALL) != 0 ? FFI_STDCALL : FFI_DEFAULT_ABI;
#else
abi = FFI_DEFAULT_ABI;
#endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jffi-next.git
More information about the pkg-java-commits
mailing list