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 6e69db3b2094b6d5de9eb9e86bfc2942143e2599 Author: Wayne Meissner <[email protected]> Date: Sun Jan 3 20:44:57 2010 +1000 Export the address of the jffi_save_errno function so it can be used from jaffl --- jni/jffi/Internals.c | 17 +++++++++++++++++ src/com/kenai/jffi/Foreign.java | 2 ++ src/com/kenai/jffi/Internals.java | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/jni/jffi/Internals.c b/jni/jffi/Internals.c new file mode 100644 index 0000000..02aa7be --- /dev/null +++ b/jni/jffi/Internals.c @@ -0,0 +1,17 @@ +#include <stdlib.h> +#include <jni.h> +#include "Exception.h" +#include "com_kenai_jffi_Foreign.h" +#include "LastError.h" +#include "jffi.h" + +/* + * Class: com_kenai_jffi_Foreign + * Method: getSaveErrnoFunction + * Signature: ()J + */ +JNIEXPORT jlong JNICALL +Java_com_kenai_jffi_Foreign_getSaveErrnoFunction(JNIEnv *env, jobject self) +{ + return p2j(jffi_save_errno); +} \ No newline at end of file diff --git a/src/com/kenai/jffi/Foreign.java b/src/com/kenai/jffi/Foreign.java index 7b15e75..71c62c3 100644 --- a/src/com/kenai/jffi/Foreign.java +++ b/src/com/kenai/jffi/Foreign.java @@ -266,6 +266,8 @@ final class Foreign { */ final native int mprotect(long addr, long len, int prot); + final native long getSaveErrnoFunction(); + final native long VirtualAlloc(long addr, int size, int flags, int prot); diff --git a/src/com/kenai/jffi/Internals.java b/src/com/kenai/jffi/Internals.java new file mode 100644 index 0000000..14ae7f9 --- /dev/null +++ b/src/com/kenai/jffi/Internals.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2009 Wayne Meissner + * + * This file is part of jffi. + * + * This code is free software: you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License version 3 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * version 3 for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>. + */ + +package com.kenai.jffi; + +/** + * Retrieves metadata about jffi C internals + */ +public final class Internals { + + private Internals() { + } + + public static final long getErrnoSaveFunction() { + return Foreign.getInstance().getSaveErrnoFunction(); + } +} -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jffi-next.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

