public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: cagney@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Wrap more JNI methods. Date: Wed, 07 May 2008 19:33:00 -0000 [thread overview] Message-ID: <20080507193311.30480.qmail@sourceware.org> (raw) The branch, master has been updated via 950427efc84e11335d06d189e8001b0673513824 (commit) from d6e58e873c2a28bb791952ebf8642254419fa689 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 950427efc84e11335d06d189e8001b0673513824 Author: Andrew Cagney <cagney@toil.yyz.redhat.com> Date: Wed May 7 15:32:07 2008 -0400 Wrap more JNI methods. frysk-sys/frysk/jnixx/ChangeLog 2008-05-07 Andrew Cagney <cagney@redhat.com> * jnixx.hxx (getStringUTFLength): New. (getStringUTFRegion): New. ----------------------------------------------------------------------- Summary of changes: frysk-sys/frysk/jnixx/ChangeLog | 3 +++ frysk-sys/frysk/jnixx/jnixx.hxx | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 0 deletions(-) First 500 lines of diff: diff --git a/frysk-sys/frysk/jnixx/ChangeLog b/frysk-sys/frysk/jnixx/ChangeLog index 5635f2c..373d244 100644 --- a/frysk-sys/frysk/jnixx/ChangeLog +++ b/frysk-sys/frysk/jnixx/ChangeLog @@ -1,5 +1,8 @@ 2008-05-07 Andrew Cagney <cagney@redhat.com> + * jnixx.hxx (getStringUTFLength): New. + (getStringUTFRegion): New. + * Printer.java: Parameterize with PrintWriter. * Main.java: Flush the Printer. * PrintDeclarations.java: Generate classes that extend either diff --git a/frysk-sys/frysk/jnixx/jnixx.hxx b/frysk-sys/frysk/jnixx/jnixx.hxx index 2330667..c5f5d9d 100644 --- a/frysk-sys/frysk/jnixx/jnixx.hxx +++ b/frysk-sys/frysk/jnixx/jnixx.hxx @@ -155,6 +155,40 @@ public: } } + jint getStringUTFLength(java::lang::String string) { + jint length = jniEnv->GetStringUTFLength((jstring) (string._object)); + // Cannot fail? + return length; + } + + void getStringUTFRegion(java::lang::String string, jsize start, + jsize len, char *buf) { + jniEnv->GetStringUTFRegion((jstring) (string._object), start, len, buf); + if (jniEnv->ExceptionCheck()) { + fprintf(stderr, + "frysk: JNIEnv.GetStringUTFRegion(%p,%d,%d,%p) failed\n", + string._object, (int) start, (int) len, buf); + throw jnixx::exception(); + } + } + + jint getStringLength(java::lang::String string) { + jint length = jniEnv->GetStringLength((jstring) (string._object)); + // Cannot fail? + return length; + } + + void getStringRegion(java::lang::String string, jsize start, + jsize len, jchar *buf) { + jniEnv->GetStringRegion((jstring) (string._object), start, len, buf); + if (jniEnv->ExceptionCheck()) { + fprintf(stderr, + "frysk: JNIEnv.GetStringRegion(%p,%d,%d,%p) failed\n", + string._object, (int) start, (int) len, buf); + throw jnixx::exception(); + } + } + jmethodID getMethodID(jclass klass, const char name[], const char signature[]) { jmethodID methodID = jniEnv->GetMethodID(klass, name, signature); hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2008-05-07 19:33 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080507193311.30480.qmail@sourceware.org \ --to=cagney@sourceware.org \ --cc=frysk-cvs@sourceware.org \ --cc=frysk@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).