public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Move ChangeLogs to frysk/jni; really add xx.[ch]xx files.
@ 2008-05-01 16:01 cagney
  0 siblings, 0 replies; only message in thread
From: cagney @ 2008-05-01 16:01 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  faf7b23b07999359f25fea39859dc47abb045024 (commit)
      from  3a720966fdb848db7f8319e81374788d4d8e7e68 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit faf7b23b07999359f25fea39859dc47abb045024
Author: Andrew Cagney <cagney@redhat.com>
Date:   Thu May 1 12:00:40 2008 -0400

    Move ChangeLogs to frysk/jni; really add xx.[ch]xx files.

-----------------------------------------------------------------------

Summary of changes:
 frysk-sys/frysk/ChangeLog     |   26 -------
 frysk-sys/frysk/jni/ChangeLog |   32 +++++++++
 frysk-sys/frysk/jni/xx.cxx    |  154 +++++++++++++++++++++++++++++++++++++++++
 frysk-sys/frysk/jni/xx.hxx    |   76 ++++++++++++++++++++
 4 files changed, 262 insertions(+), 26 deletions(-)
 create mode 100644 frysk-sys/frysk/jni/ChangeLog
 create mode 100644 frysk-sys/frysk/jni/xx.cxx
 create mode 100644 frysk-sys/frysk/jni/xx.hxx

First 500 lines of diff:
diff --git a/frysk-sys/frysk/ChangeLog b/frysk-sys/frysk/ChangeLog
index 6472df8..e0baf3a 100644
--- a/frysk-sys/frysk/ChangeLog
+++ b/frysk-sys/frysk/ChangeLog
@@ -1,29 +1,3 @@
-2008-05-01  Andrew Cagney  <cagney@redhat.com>
-
-	* jni/jnixx.java: Use findClass and frysk/jni/xx.hxx; throw
-	jnixx_exception.
-	* jni/xx.hxx: Replace jni/members.hxx.
-	* jni/xx.cxx: Replace jni/members.cxx.
-
-	* jni/jnixx.java: Generate Class(JNIEnv*) method; drop jclass
-	parameter; don't new the exception.
-
-2008-04-30  Andrew Cagney  <cagney@redhat.com>
-
-	* jni/jnixx.java: New.
-
-2008-04-17  Andrew Cagney  <cagney@redhat.com>
-
-	* jni/exceptions.cxx: New.
-	* jni/exceptions.hxx: New.
-
-2008-04-16  Andrew Cagney  <cagney@redhat.com>
-
-	* jni/util.cxx: New.
-	* jni/print.cxx: New.
-	* jni/print.hxx: New.
-	* jni/util.hxx: New.
-
 2008-03-03  Andrew Cagney  <cagney@redhat.com>
 
 	* TestConfig.java: Move to frysk.config.
diff --git a/frysk-sys/frysk/jni/ChangeLog b/frysk-sys/frysk/jni/ChangeLog
new file mode 100644
index 0000000..0dbcf5b
--- /dev/null
+++ b/frysk-sys/frysk/jni/ChangeLog
@@ -0,0 +1,32 @@
+2008-05-01  Andrew Cagney  <cagney@redhat.com>
+
+	* jnixx.java: Use findClass and frysk/jni/xx.hxx; throw
+	jnixx_exception.
+	* xx.hxx: Replace members.hxx.
+	* xx.cxx: Replace members.cxx.
+
+	* jnixx.java: Generate Class(JNIEnv*) method; drop jclass
+	parameter; don't new the exception.
+
+2008-04-30  Andrew Cagney  <cagney@redhat.com>
+
+	* jnixx.java: New.
+
+2008-04-17  Andrew Cagney  <cagney@redhat.com>
+
+	* exceptions.cxx: New.
+	* exceptions.hxx: New.
+
+2008-04-16  Andrew Cagney  <cagney@redhat.com>
+
+	* util.cxx: New.
+	* print.cxx: New.
+	* print.hxx: New.
+	* util.hxx: New.
+\f
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/frysk-sys/frysk/jni/xx.cxx b/frysk-sys/frysk/jni/xx.cxx
new file mode 100644
index 0000000..fec56e0
--- /dev/null
+++ b/frysk-sys/frysk/jni/xx.cxx
@@ -0,0 +1,154 @@
+// This file is part of the program FRYSK.
+//
+// Copyright 2008, Red Hat Inc.
+//
+// FRYSK is free software; you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation; version 2 of the License.
+//
+// FRYSK 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
+// General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with FRYSK; if not, write to the Free Software Foundation,
+// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+// 
+// In addition, as a special exception, Red Hat, Inc. gives You the
+// additional right to link the code of FRYSK with code not covered
+// under the GNU General Public License ("Non-GPL Code") and to
+// distribute linked combinations including the two, subject to the
+// limitations in this paragraph. Non-GPL Code permitted under this
+// exception must only link to the code of FRYSK through those well
+// defined interfaces identified in the file named EXCEPTION found in
+// the source code files (the "Approved Interfaces"). The files of
+// Non-GPL Code may instantiate templates or use macros or inline
+// functions from the Approved Interfaces without causing the
+// resulting work to be covered by the GNU General Public
+// License. Only Red Hat, Inc. may make changes or additions to the
+// list of Approved Interfaces. You must obey the GNU General Public
+// License in all respects for all of the FRYSK code and other code
+// used in conjunction with FRYSK except the Non-GPL Code covered by
+// this exception. If you modify this file, you may extend this
+// exception to your version of the file, but you are not obligated to
+// do so. If you do not wish to provide this exception without
+// modification, you must delete this exception statement from your
+// version and license this file solely under the GPL without
+// exception.
+
+#include "frysk/jni/xx.hxx"
+
+jclass
+findClass(JNIEnv* env, const char *signature) {
+  jclass klass = env->FindClass(signature);
+  if (klass == NULL) {
+    throw jnixx_exception();
+  }
+  return klass;
+}
+
+jstring
+newStringUTF(JNIEnv* env, const char *string) {
+  jstring utf = env->NewStringUTF(string);
+  if (utf == NULL) {
+    throw jnixx_exception();
+  }
+  return utf;
+}
+
+jmethodID
+getMethodID(JNIEnv* env, jobject object, const char* name,
+	    const char* signature) {
+  jclass klass = env->GetObjectClass(object);
+  if (klass == NULL) {
+    fprintf(stderr, "frysk: failed to find class for method %s%s\n",
+	    name, signature);
+    throw jnixx_exception();
+  }
+  return getMethodID(env, klass, name, signature);
+}
+
+jmethodID
+getMethodID(JNIEnv* env, jclass klass, const char* name,
+	    const char* signature) {
+  jmethodID methodID = env->GetMethodID(klass, name, signature);
+  if (methodID == NULL) {
+    fprintf(stderr, "frysk: failed to find method %s%s\n",
+	    name, signature);
+    throw jnixx_exception();
+  }
+  return methodID;
+}
+
+jmethodID
+getStaticMethodID(JNIEnv* env, jobject object, const char* name,
+		  const char* signature) {
+  jclass klass = env->GetObjectClass(object);
+  if (klass == NULL) {
+    fprintf(stderr, "frysk: failed to find class for method %s%s\n",
+	    name, signature);
+    throw jnixx_exception();
+  }
+  return getStaticMethodID(env, klass, name, signature);
+}
+
+jmethodID
+getStaticMethodID(JNIEnv* env, jclass klass, const char* name,
+		  const char* signature) {
+  jmethodID methodID = env->GetStaticMethodID(klass, name, signature);
+  if (methodID == NULL) {
+    fprintf(stderr, "frysk: failed to find method %s%s\n",
+	    name, signature);
+    throw jnixx_exception();
+  }
+  return methodID;
+}
+
+jfieldID
+getFieldID(JNIEnv* env, jobject object, const char* name,
+	   const char* signature) {
+    jclass klass = env->GetObjectClass(object);
+    if (klass == NULL) {
+      fprintf(stderr, "frysk: failed to find class for field %s%s\n",
+	      name, signature);
+      throw jnixx_exception();
+    }
+    return getFieldID(env, klass, name, signature);
+}
+
+jfieldID
+getFieldID(JNIEnv* env, jclass klass, const char* name,
+	   const char* signature) {
+    jfieldID fieldID = env->GetFieldID(klass, name, signature);
+    if (fieldID == NULL) {
+      fprintf(stderr, "frysk: failed to find field %s%s\n",
+	      name, signature);
+      throw jnixx_exception();
+    }
+    return fieldID;
+}
+
+jfieldID
+getStaticFieldID(JNIEnv* env, jobject object, const char* name,
+		 const char* signature) {
+    jclass klass = env->GetObjectClass(object);
+    if (klass == NULL) {
+      fprintf(stderr, "frysk: failed to find class for field %s%s\n",
+	      name, signature);
+      throw jnixx_exception();
+    }
+    return getStaticFieldID(env, klass, name, signature);
+}
+
+jfieldID
+getStaticFieldID(JNIEnv* env, jclass klass, const char* name,
+		 const char* signature) {
+  jfieldID fieldID = env->GetStaticFieldID(klass, name, signature);
+  if (fieldID == NULL) {
+    fprintf(stderr, "frysk: failed to find static field %s%s\n",
+	    name, signature);
+    throw jnixx_exception();
+  }
+  return fieldID;
+}
diff --git a/frysk-sys/frysk/jni/xx.hxx b/frysk-sys/frysk/jni/xx.hxx
new file mode 100644
index 0000000..90c2f42
--- /dev/null
+++ b/frysk-sys/frysk/jni/xx.hxx
@@ -0,0 +1,76 @@
+// This file is part of the program FRYSK.
+//
+// Copyright 2008, Red Hat Inc.
+//
+// FRYSK is free software; you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation; version 2 of the License.
+//
+// FRYSK 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
+// General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with FRYSK; if not, write to the Free Software Foundation,
+// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+// 
+// In addition, as a special exception, Red Hat, Inc. gives You the
+// additional right to link the code of FRYSK with code not covered
+// under the GNU General Public License ("Non-GPL Code") and to
+// distribute linked combinations including the two, subject to the
+// limitations in this paragraph. Non-GPL Code permitted under this
+// exception must only link to the code of FRYSK through those well
+// defined interfaces identified in the file named EXCEPTION found in
+// the source code files (the "Approved Interfaces"). The files of
+// Non-GPL Code may instantiate templates or use macros or inline
+// functions from the Approved Interfaces without causing the
+// resulting work to be covered by the GNU General Public
+// License. Only Red Hat, Inc. may make changes or additions to the
+// list of Approved Interfaces. You must obey the GNU General Public
+// License in all respects for all of the FRYSK code and other code
+// used in conjunction with FRYSK except the Non-GPL Code covered by
+// this exception. If you modify this file, you may extend this
+// exception to your version of the file, but you are not obligated to
+// do so. If you do not wish to provide this exception without
+// modification, you must delete this exception statement from your
+// version and license this file solely under the GPL without
+// exception.
+
+/**
+ * These methods either return the requested ID; or print a message to
+ * stderr and then throws a jnixx_exception.
+ */
+
+#include <jni.h>
+
+class jnixx_exception {
+};
+
+extern jclass findClass(JNIEnv* env, const char *signature);
+
+extern jstring newStringUTF(JNIEnv* env, const char *string);
+
+extern jmethodID getMethodID(JNIEnv* env, jobject object,
+			     const char* name, const char* signature);
+
+extern jmethodID getMethodID(JNIEnv* env, jclass klass,
+			     const char* name, const char* signature);
+
+extern jfieldID getFieldID(JNIEnv* env, jobject object,
+			   const char* name, const char* signature);
+
+extern jfieldID getFieldID(JNIEnv* env, jclass klass,
+			   const char* name, const char* signature);
+
+extern jmethodID getStaticMethodID(JNIEnv* env, jobject object,
+				   const char* name, const char* signature);
+
+extern jmethodID getStaticMethodID(JNIEnv* env, jclass klass,
+				   const char* name, const char* signature);
+
+extern jfieldID getStaticFieldID(JNIEnv* env, jobject object,
+				 const char* name, const char* signature);
+
+extern jfieldID getStaticFieldID(JNIEnv* env, jclass klass,
+				 const char* name, const char* signature);


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-01 16:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-01 16:01 [SCM] master: Move ChangeLogs to frysk/jni; really add xx.[ch]xx files cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).