classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch: remove C++ keywords


From: Ingo Prötel
Subject: Patch: remove C++ keywords
Date: Wed, 07 Apr 2004 18:32:42 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

Hi,

I would like to suggest removing all C++ keywords as names in the native implementations of GNU Classpath. We have a customer who insists on using C++ because of the more thorough code inspection.
To be able to compile with such a compiler we need to change all names that are 
C++ keywords.

I have attached cases where we already have changed this.
My feeling is that if we have the 'extern "C"' construct in the header files we should also try to have the code compilable with a C++ compiler.

Let me know what you think.
ingo

--
Ingo Prötel                                          address@hidden
aicas GmbH                                        http://www.aicas.com
Haid-und-Neu-Str. 18                        phone   +49 721 663 968-32
76131 Karlsruhe                             fax     +49 721 663 968-93
Germany
cvs server: Diffing native/jni
cvs server: Diffing native/jni/classpath
cvs server: Diffing native/jni/gtk-peer
cvs server: Diffing native/jni/java-awt
cvs server: Diffing native/jni/java-io
cvs server: Diffing native/jni/java-lang
cvs server: Diffing native/jni/java-net
Index: native/jni/java-net/gnu_java_net_PlainDatagramSocketImpl.c
===================================================================
RCS file: 
/cvsroot/classpath/classpath/native/jni/java-net/gnu_java_net_PlainDatagramSocketImpl.c,v
retrieving revision 1.4
diff -u -r1.4 gnu_java_net_PlainDatagramSocketImpl.c
--- native/jni/java-net/gnu_java_net_PlainDatagramSocketImpl.c  29 Mar 2004 
07:07:39 -0000      1.4
+++ native/jni/java-net/gnu_java_net_PlainDatagramSocketImpl.c  7 Apr 2004 
16:22:06 -0000
@@ -67,13 +67,13 @@
  * Creates a new datagram socket
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainDatagramSocketImpl_create(JNIEnv *env, jobject this)
+Java_gnu_java_net_PlainDatagramSocketImpl_create(JNIEnv *env, jobject thiz)
 {
   assert(env!=NULL);
   assert((*env)!=NULL);
 
 #ifndef WITHOUT_NETWORK
-  _javanet_create(env, this, 0);
+  _javanet_create(env, thiz, 0);
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
@@ -84,13 +84,13 @@
  * Close the socket.
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainDatagramSocketImpl_close(JNIEnv *env, jobject this)
+Java_gnu_java_net_PlainDatagramSocketImpl_close(JNIEnv *env, jobject thiz)
 {
   assert(env!=NULL);
   assert((*env)!=NULL);
 
 #ifndef WITHOUT_NETWORK
-  _javanet_close(env, this, 0);
+  _javanet_close(env, thiz, 0);
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
@@ -103,14 +103,14 @@
  * variables. 
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainDatagramSocketImpl_bind(JNIEnv *env, jobject this, 
+Java_gnu_java_net_PlainDatagramSocketImpl_bind(JNIEnv *env, jobject thiz, 
                                            jint port, jobject addr)
 {
   assert(env!=NULL);
   assert((*env)!=NULL);
 
 #ifndef WITHOUT_NETWORK
-  _javanet_bind(env, this, addr, port, 0);
+  _javanet_bind(env, thiz, addr, port, 0);
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
@@ -121,14 +121,14 @@
  * This method sets the specified option for a socket
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainDatagramSocketImpl_setOption(JNIEnv *env, jobject this, 
+Java_gnu_java_net_PlainDatagramSocketImpl_setOption(JNIEnv *env, jobject thiz, 
                                                 jint option_id, jobject val)
 {
   assert(env!=NULL);
   assert((*env)!=NULL);
 
 #ifndef WITHOUT_NETWORK
-  _javanet_set_option(env, this, option_id, val);
+  _javanet_set_option(env, thiz, option_id, val);
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
@@ -139,14 +139,14 @@
  * This method sets the specified option for a socket
  */
 JNIEXPORT jobject JNICALL
-Java_gnu_java_net_PlainDatagramSocketImpl_getOption(JNIEnv *env, jobject this, 
+Java_gnu_java_net_PlainDatagramSocketImpl_getOption(JNIEnv *env, jobject thiz, 
                                                 jint option_id)
 {
   assert(env!=NULL);
   assert((*env)!=NULL);
 
 #ifndef WITHOUT_NETWORK
-  return(_javanet_get_option(env, this, option_id));
+  return(_javanet_get_option(env, thiz, option_id));
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
@@ -157,7 +157,7 @@
  * Reads a buffer from a remote host
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainDatagramSocketImpl_receive0(JNIEnv *env, jobject this, 
+Java_gnu_java_net_PlainDatagramSocketImpl_receive0(JNIEnv *env, jobject thiz, 
                                               jobject packet)
 {
 #ifndef WITHOUT_NETWORK
@@ -228,7 +228,7 @@
 
   /* Receive the packet */
   /* should we try some sort of validation on the length? */
-  bytes_read = _javanet_recvfrom(env, this, arr, offset, maxlen, &addr, 
&port); 
+  bytes_read = _javanet_recvfrom(env, thiz, arr, offset, maxlen, &addr, 
&port); 
   if ((bytes_read == -1) || (*env)->ExceptionOccurred(env))
     {
       JCL_ThrowException(env, IO_EXCEPTION, "Internal error: receive");
@@ -343,7 +343,7 @@
  * Writes a buffer to the remote host
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainDatagramSocketImpl_sendto(JNIEnv *env, jobject this, 
+Java_gnu_java_net_PlainDatagramSocketImpl_sendto(JNIEnv *env, jobject thiz, 
                                              jobject addr, jint port, jarray 
buf, 
                                              jint offset, jint len)
 {
@@ -359,7 +359,7 @@
 
   DBG("PlainDatagramSocketImpl.sendto(): have addr\n");
 
-  _javanet_sendto(env, this, buf, offset, len, netAddress, port);
+  _javanet_sendto(env, thiz, buf, offset, len, netAddress, port);
   if ((*env)->ExceptionOccurred(env))
     { JCL_ThrowException(env, IO_EXCEPTION, "Internal error: send data"); 
return; }
 
@@ -374,7 +374,7 @@
  * Joins a multicast group
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainDatagramSocketImpl_join(JNIEnv *env, jobject this, 
+Java_gnu_java_net_PlainDatagramSocketImpl_join(JNIEnv *env, jobject thiz, 
                                            jobject addr)
 {
 #ifndef WITHOUT_NETWORK
@@ -392,7 +392,7 @@
       return;
     }
 
-  fd = _javanet_get_int_field(env, this, "native_fd");
+  fd = _javanet_get_int_field(env, thiz, "native_fd");
   if ((*env)->ExceptionOccurred(env))
     {
       JCL_ThrowException(env, IO_EXCEPTION, "Internal error");
@@ -420,7 +420,7 @@
  * Leaves a multicast group
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainDatagramSocketImpl_leave(JNIEnv *env, jobject this, 
+Java_gnu_java_net_PlainDatagramSocketImpl_leave(JNIEnv *env, jobject thiz, 
                                             jobject addr)
 {
 #ifndef WITHOUT_NETWORK
@@ -438,7 +438,7 @@
       return;
     }
 
-  fd = _javanet_get_int_field(env, this, "native_fd");
+  fd = _javanet_get_int_field(env, thiz, "native_fd");
   if ((*env)->ExceptionOccurred(env))
     { JCL_ThrowException(env, IO_EXCEPTION, "Internal error"); return; }
 
@@ -455,3 +455,4 @@
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
+
Index: native/jni/java-net/gnu_java_net_PlainSocketImpl.c
===================================================================
RCS file: 
/cvsroot/classpath/classpath/native/jni/java-net/gnu_java_net_PlainSocketImpl.c,v
retrieving revision 1.3
diff -u -r1.3 gnu_java_net_PlainSocketImpl.c
--- native/jni/java-net/gnu_java_net_PlainSocketImpl.c  29 Mar 2004 07:07:39 
-0000      1.3
+++ native/jni/java-net/gnu_java_net_PlainSocketImpl.c  7 Apr 2004 16:22:06 
-0000
@@ -68,13 +68,13 @@
  * Creates a new stream or datagram socket
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainSocketImpl_create(JNIEnv *env, jobject this, jboolean 
stream)
+Java_gnu_java_net_PlainSocketImpl_create(JNIEnv *env, jobject thiz, jboolean 
stream)
 {
 #ifndef WITHOUT_NETWORK
   assert(env!=NULL);
   assert((*env)!=NULL);
 
-  _javanet_create(env, this, stream);
+  _javanet_create(env, thiz, stream);
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
@@ -86,13 +86,13 @@
  * action as well.
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainSocketImpl_close(JNIEnv *env, jobject this)
+Java_gnu_java_net_PlainSocketImpl_close(JNIEnv *env, jobject thiz)
 {
 #ifndef WITHOUT_NETWORK
   assert(env!=NULL);
   assert((*env)!=NULL);
 
-  _javanet_close(env, this, 1);
+  _javanet_close(env, thiz, 1);
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
@@ -103,14 +103,14 @@
  * Connects to the specified destination.
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainSocketImpl_connect(JNIEnv *env, jobject this, 
+Java_gnu_java_net_PlainSocketImpl_connect(JNIEnv *env, jobject thiz, 
                                       jobject addr, jint port)
 {
 #ifndef WITHOUT_NETWORK
   assert(env!=NULL);
   assert((*env)!=NULL);
 
-  _javanet_connect(env, this, addr, port);
+  _javanet_connect(env, thiz, addr, port);
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
@@ -123,14 +123,14 @@
  * variables. 
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainSocketImpl_bind(JNIEnv *env, jobject this, jobject addr,
+Java_gnu_java_net_PlainSocketImpl_bind(JNIEnv *env, jobject thiz, jobject addr,
                                    jint port)
 {
 #ifndef WITHOUT_NETWORK
   assert(env!=NULL);
   assert((*env)!=NULL);
 
-  _javanet_bind(env, this, addr, port, 1);
+  _javanet_bind(env, thiz, addr, port, 1);
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
@@ -142,13 +142,13 @@
  * connections allowed.
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainSocketImpl_listen(JNIEnv *env, jobject this, jint 
queuelen)
+Java_gnu_java_net_PlainSocketImpl_listen(JNIEnv *env, jobject thiz, jint 
queuelen)
 {
 #ifndef WITHOUT_NETWORK
   assert(env!=NULL);
   assert((*env)!=NULL);
 
-  _javanet_listen(env, this, queuelen);
+  _javanet_listen(env, thiz, queuelen);
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
@@ -160,13 +160,13 @@
  * object. Note that we assume this is a PlainSocketImpl just like us.
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainSocketImpl_accept(JNIEnv *env, jobject this, jobject 
impl)
+Java_gnu_java_net_PlainSocketImpl_accept(JNIEnv *env, jobject thiz, jobject 
impl)
 {
 #ifndef WITHOUT_NETWORK
   assert(env!=NULL);
   assert((*env)!=NULL);
 
-  _javanet_accept(env, this, impl);
+  _javanet_accept(env, thiz, impl);
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
@@ -174,7 +174,7 @@
 /*************************************************************************/
 
 JNIEXPORT jint JNICALL
-Java_gnu_java_net_PlainSocketImpl_available(JNIEnv *env, jobject this)
+Java_gnu_java_net_PlainSocketImpl_available(JNIEnv *env, jobject thiz)
 {
 #ifndef WITHOUT_NETWORK
   jclass   cls;
@@ -186,7 +186,7 @@
   assert(env!=NULL);
   assert((*env)!=NULL);
 
-  cls = (*env)->GetObjectClass(env, this);
+  cls = (*env)->GetObjectClass(env, thiz);
   if (cls == 0)
     {
       JCL_ThrowException(env, IO_EXCEPTION, "internal error");
@@ -200,7 +200,7 @@
       return 0;
     }
 
-  fd = (*env)->GetIntField(env, this, fid);
+  fd = (*env)->GetIntField(env, thiz, fid);
   
   TARGET_NATIVE_NETWORK_SOCKET_RECEIVE_AVAILABLE(fd,bytesAvailable,result);
   if (result != TARGET_NATIVE_OK)
@@ -220,14 +220,14 @@
  * This method sets the specified option for a socket
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainSocketImpl_setOption(JNIEnv *env, jobject this, 
+Java_gnu_java_net_PlainSocketImpl_setOption(JNIEnv *env, jobject thiz, 
                                         jint option_id, jobject val)
 {
 #ifndef WITHOUT_NETWORK
   assert(env!=NULL);
   assert((*env)!=NULL);
 
-  _javanet_set_option(env, this, option_id, val);
+  _javanet_set_option(env, thiz, option_id, val);
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
@@ -238,14 +238,14 @@
  * This method sets the specified option for a socket
  */
 JNIEXPORT jobject JNICALL
-Java_gnu_java_net_PlainSocketImpl_getOption(JNIEnv *env, jobject this, 
+Java_gnu_java_net_PlainSocketImpl_getOption(JNIEnv *env, jobject thiz, 
                                         jint option_id)
 {
 #ifndef WITHOUT_NETWORK
   assert(env!=NULL);
   assert((*env)!=NULL);
 
-  return(_javanet_get_option(env, this, option_id));
+  return(_javanet_get_option(env, thiz, option_id));
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
@@ -256,14 +256,14 @@
  * Reads a buffer from a remote host
  */
 JNIEXPORT jint JNICALL
-Java_gnu_java_net_PlainSocketImpl_read(JNIEnv *env, jobject this, jarray buf,
+Java_gnu_java_net_PlainSocketImpl_read(JNIEnv *env, jobject thiz, jarray buf,
                                    jint offset, jint len)
 {
 #ifndef WITHOUT_NETWORK
   assert(env!=NULL);
   assert((*env)!=NULL);
 
-  return(_javanet_recvfrom(env, this, buf, offset, len, 0, 0));
+  return(_javanet_recvfrom(env, thiz, buf, offset, len, 0, 0));
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
@@ -274,14 +274,14 @@
  * Writes a buffer to the remote host
  */
 JNIEXPORT void JNICALL
-Java_gnu_java_net_PlainSocketImpl_write(JNIEnv *env, jobject this, jarray buf,
+Java_gnu_java_net_PlainSocketImpl_write(JNIEnv *env, jobject thiz, jarray buf,
                                     jint offset, jint len)
 {
 #ifndef WITHOUT_NETWORK
   assert(env!=NULL);
   assert((*env)!=NULL);
 
-  _javanet_sendto(env, this, buf, offset, len, 0, 0);
+  _javanet_sendto(env, thiz, buf, offset, len, 0, 0);
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
 }
Index: native/jni/java-net/java_net_InetAddress.c
===================================================================
RCS file: 
/cvsroot/classpath/classpath/native/jni/java-net/java_net_InetAddress.c,v
retrieving revision 1.9
diff -u -r1.9 java_net_InetAddress.c
--- native/jni/java-net/java_net_InetAddress.c  29 Mar 2004 07:07:39 -0000      
1.9
+++ native/jni/java-net/java_net_InetAddress.c  7 Apr 2004 16:22:06 -0000
@@ -61,7 +61,7 @@
  * Function to return the local hostname
  */
 JNIEXPORT jstring JNICALL
-Java_java_net_InetAddress_getLocalHostname(JNIEnv *env, jclass class)
+Java_java_net_InetAddress_getLocalHostname(JNIEnv *env, jclass clazz)
 {
   char    hostname[256];
   int     result;
@@ -91,7 +91,7 @@
  * Returns the value of the special IP address INADDR_ANY 
  */
 JNIEXPORT jarray JNICALL
-Java_java_net_InetAddress_lookupInaddrAny(JNIEnv *env, jclass class)
+Java_java_net_InetAddress_lookupInaddrAny(JNIEnv *env, jclass clazz)
 {
   jarray IParray; 
   jbyte  *octets;
@@ -135,7 +135,7 @@
  * in as a byte array
  */
 JNIEXPORT jstring JNICALL
-Java_java_net_InetAddress_getHostByAddr(JNIEnv *env, jclass class, jarray arr)
+Java_java_net_InetAddress_getHostByAddr(JNIEnv *env, jclass clazz, jarray arr)
 {
 #ifndef WITHOUT_NETWORK
   jbyte   *octets;
@@ -193,7 +193,7 @@
 /*************************************************************************/
 
 JNIEXPORT jobjectArray JNICALL
-Java_java_net_InetAddress_getHostByName(JNIEnv *env, jclass class, jstring 
host)
+Java_java_net_InetAddress_getHostByName(JNIEnv *env, jclass clazz, jstring 
host)
 {
 #ifndef WITHOUT_NETWORK
   const char     *hostname;
@@ -201,7 +201,7 @@
   int            addresses[64];
   jsize          addresses_count;
   int            result;
-  jclass         arr_class;
+  jclass         arr_clazz;
   jobjectArray   addrs;
   int            i;
   jbyte          *octets;
@@ -221,7 +221,7 @@
   /* Look up the host */
   TARGET_NATIVE_NETWORK_GET_HOSTNAME_BY_NAME(hostname,
                                              addresses,
-                                             
sizeof(addresses)/sizeof(addresses[0]),
+                                             
((jsize)(sizeof(addresses)/sizeof(addresses[0]))),
                                              addresses_count,
                                              result
                                             );
@@ -232,14 +232,14 @@
     }
   (*env)->ReleaseStringUTFChars(env, host, hostname);
 
-  arr_class = (*env)->FindClass(env,"[B");
-  if (!arr_class)
+  arr_clazz = (*env)->FindClass(env,"[B");
+  if (!arr_clazz)
     {
       JCL_ThrowException(env, UNKNOWN_HOST_EXCEPTION, "Internal Error");
       return (jobjectArray)NULL;
     }
 
-  addrs = (*env)->NewObjectArray(env, addresses_count, arr_class, 0);
+  addrs = (*env)->NewObjectArray(env, addresses_count, arr_clazz, 0);
   if (!addrs)
     {
       JCL_ThrowException(env, UNKNOWN_HOST_EXCEPTION, "Internal Error");
Index: native/jni/java-net/java_net_NetworkInterface.c
===================================================================
RCS file: 
/cvsroot/classpath/classpath/native/jni/java-net/java_net_NetworkInterface.c,v
retrieving revision 1.5
diff -u -r1.5 java_net_NetworkInterface.c
--- native/jni/java-net/java_net_NetworkInterface.c     29 Mar 2004 07:07:39 
-0000      1.5
+++ native/jni/java-net/java_net_NetworkInterface.c     7 Apr 2004 16:22:06 
-0000
@@ -54,7 +54,7 @@
  * Returns all local network interfaces as vector
  */
 JNIEXPORT jobject JNICALL
-Java_java_net_NetworkInterface_getRealNetworkInterfaces (JNIEnv* env, jclass 
class)
+Java_java_net_NetworkInterface_getRealNetworkInterfaces (JNIEnv* env, jclass 
clazz)
 {
   JCL_ThrowException (env, IO_EXCEPTION, 
"java.net.NetworkInterface.getRealNetworkInterfaces(): not implemented");
   return 0;
Index: native/jni/java-net/javanet.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/java-net/javanet.c,v
retrieving revision 1.15
diff -u -r1.15 javanet.c
--- native/jni/java-net/javanet.c       29 Mar 2004 07:07:39 -0000      1.15
+++ native/jni/java-net/javanet.c       7 Apr 2004 16:22:07 -0000
@@ -1,4 +1,4 @@
-/* javanet.c - Common internal functions for the java.net package
+
/* javanet.c - Common internal functions for the java.net package
    Copyright (C) 1998, 2002 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
@@ -71,7 +71,7 @@
  * Sets an integer field in the specified object.
  */
 static void
-_javanet_set_int_field(JNIEnv *env, jobject obj, char *class, char *field, 
+_javanet_set_int_field(JNIEnv *env, jobject obj, char *clazz, char *field, 
                        int val)
 {
   jclass   cls;
@@ -80,7 +80,7 @@
   assert(env!=NULL);
   assert((*env)!=NULL);
 
-  cls = (*env)->FindClass(env, class);
+  cls = (*env)->FindClass(env, clazz);
   if (cls == NULL)
     return;
 
@@ -133,7 +133,7 @@
  * need to include it.
  */
 static void
-_javanet_create_localfd(JNIEnv *env, jobject this)
+_javanet_create_localfd(JNIEnv *env, jobject thiz)
 {
   jclass    this_cls, fd_cls;
   jfieldID  fid;
@@ -176,7 +176,7 @@
   DBG("_javanet_create_localfd(): Created FileDescriptor\n");
 
   /* Now set the pointer to the new FileDescriptor */
-  (*env)->SetObjectField(env, this, fid, fd_obj);
+  (*env)->SetObjectField(env, thiz, fid, fd_obj);
   DBG("_javanet_create_localfd(): Set fd field\n");
 
   return;
@@ -317,7 +317,7 @@
 /*************************************************************************/
 
 static void
-_javanet_set_remhost_addr(JNIEnv *env, jobject this, jobject ia)
+_javanet_set_remhost_addr(JNIEnv *env, jobject thiz, jobject ia)
 {
   jclass   this_cls;
   jfieldID fid;
@@ -336,7 +336,7 @@
 
   DBG("_javanet_set_remhost_addr(): Found address field\n");
 
-  (*env)->SetObjectField(env, this, fid, ia);
+  (*env)->SetObjectField(env, thiz, fid, ia);
   DBG("_javanet_set_remhost_addr(): Set field\n");
 }
 
@@ -345,7 +345,7 @@
  * InetAddress for the specified addr
  */
 static void
-_javanet_set_remhost(JNIEnv *env, jobject this, int netaddr)
+_javanet_set_remhost(JNIEnv *env, jobject thiz, int netaddr)
 {
   jobject ia;
 
@@ -359,7 +359,7 @@
   if (ia == NULL)
     return;
 
-  _javanet_set_remhost_addr(env, this, ia);
+  _javanet_set_remhost_addr(env, thiz, ia);
 }
 
 
@@ -436,7 +436,7 @@
  * Creates a new stream or datagram socket
  */
 void
-_javanet_create(JNIEnv *env, jobject this, jboolean stream)
+_javanet_create(JNIEnv *env, jobject thiz, jboolean stream)
 {
 #ifndef WITHOUT_NETWORK
   int fd;
@@ -473,10 +473,10 @@
     }
     
   if (stream)
-    _javanet_set_int_field(env, this, "gnu/java/net/PlainSocketImpl", 
+    _javanet_set_int_field(env, thiz, "gnu/java/net/PlainSocketImpl", 
                            "native_fd", fd);
   else
-    _javanet_set_int_field(env, this, "gnu/java/net/PlainDatagramSocketImpl", 
+    _javanet_set_int_field(env, thiz, "gnu/java/net/PlainDatagramSocketImpl", 
                            "native_fd", fd);
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
@@ -489,7 +489,7 @@
  * action as well.
  */
 void
-_javanet_close(JNIEnv *env, jobject this, int stream)
+_javanet_close(JNIEnv *env, jobject thiz, int stream)
 {
 #ifndef WITHOUT_NETWORK
   int fd;
@@ -498,17 +498,17 @@
   assert(env!=NULL);
   assert((*env)!=NULL);
 
-  fd = _javanet_get_int_field(env, this, "native_fd");
+  fd = _javanet_get_int_field(env, thiz, "native_fd");
   if (fd == -1)
     return;
  
   TARGET_NATIVE_NETWORK_SOCKET_CLOSE(fd,result);
 
   if (stream)
-    _javanet_set_int_field(env, this, "gnu/java/net/PlainSocketImpl",
+    _javanet_set_int_field(env, thiz, "gnu/java/net/PlainSocketImpl",
                            "native_fd", -1);
   else
-    _javanet_set_int_field(env, this, "gnu/java/net/PlainDatagramSocketImpl",
+    _javanet_set_int_field(env, thiz, "gnu/java/net/PlainDatagramSocketImpl",
                            "native_fd", -1);
 #else /* not WITHOUT_NETWORK */
 #endif /* not WITHOUT_NETWORK */
@@ -520,7 +520,7 @@
  * Connects to the specified destination.
  */
 void 
-_javanet_connect(JNIEnv *env, jobject this, jobject addr, jint port)
+_javanet_connect(JNIEnv *env, jobject thiz, jobject addr, jint port)
 {
 #ifndef WITHOUT_NETWORK
   int netaddr, fd;
@@ -543,7 +543,7 @@
   DBG("_javanet_connect(): Got network address\n");
 
   /* Grab the real socket file descriptor */
-  fd = _javanet_get_int_field(env, this, "native_fd");
+  fd = _javanet_get_int_field(env, thiz, "native_fd");
   if (fd == -1)
     { 
       JCL_ThrowException(env, IO_EXCEPTION, 
@@ -570,7 +570,7 @@
       return;
     }
 
-  _javanet_create_localfd(env, this);
+  _javanet_create_localfd(env, thiz);
   if ((*env)->ExceptionOccurred(env))
     {
       TARGET_NATIVE_NETWORK_SOCKET_CLOSE(fd,result);
@@ -578,7 +578,7 @@
     }
   DBG("_javanet_connect(): Created fd\n");
 
-  _javanet_set_int_field(env, this, "java/net/SocketImpl", "localport", 
+  _javanet_set_int_field(env, thiz, "java/net/SocketImpl", "localport", 
                          local_port);
   if ((*env)->ExceptionOccurred(env))
     {
@@ -597,11 +597,11 @@
 
   if (remote_address == netaddr)
     {
-      _javanet_set_remhost_addr(env, this, addr);
+      _javanet_set_remhost_addr(env, thiz, addr);
     }
   else
     {
-      _javanet_set_remhost(env, this, remote_address);
+      _javanet_set_remhost(env, thiz, remote_address);
     }
   if ((*env)->ExceptionOccurred(env))
     {
@@ -610,7 +610,7 @@
     }
   DBG("_javanet_connect(): Set the remote host\n");
 
-  _javanet_set_int_field(env, this, "java/net/SocketImpl", "port", 
+  _javanet_set_int_field(env, thiz, "java/net/SocketImpl", "port", 
                          remote_port);
   if ((*env)->ExceptionOccurred(env))
     {
@@ -630,7 +630,7 @@
  * port public instance variables. 
  */
 void
-_javanet_bind(JNIEnv *env, jobject this, jobject addr, jint port, int stream)
+_javanet_bind(JNIEnv *env, jobject thiz, jobject addr, jint port, int stream)
 {
 #ifndef WITHOUT_NETWORK
   jclass     cls;
@@ -671,7 +671,7 @@
   DBG("_javanet_bind(): Past grab array\n");
 
   /* Get the native socket file descriptor */
-  fd = _javanet_get_int_field(env, this, "native_fd");
+  fd = _javanet_get_int_field(env, thiz, "native_fd");
   if (fd == -1)
     {
       (*env)->ReleaseByteArrayElements(env, arr, octets, 0);
@@ -682,7 +682,7 @@
   DBG("_javanet_bind(): Past native_fd lookup\n");
 
 // NYI ???
-  _javanet_set_option (env, this, SOCKOPT_SO_REUSEADDR, 
+  _javanet_set_option (env, thiz, SOCKOPT_SO_REUSEADDR, 
                       _javanet_create_boolean (env, JNI_TRUE));
 
 
@@ -713,10 +713,10 @@
     }
 
   if (stream)
-    _javanet_set_int_field(env, this, "java/net/SocketImpl", 
+    _javanet_set_int_field(env, thiz, "java/net/SocketImpl", 
                            "localport", local_port);
   else
-    _javanet_set_int_field(env, this, "java/net/DatagramSocketImpl", 
+    _javanet_set_int_field(env, thiz, "java/net/DatagramSocketImpl", 
                            "localPort", local_port);
   DBG("_javanet_bind(): Past update port number\n");
 
@@ -732,7 +732,7 @@
  * connections allowed.
  */
 void 
-_javanet_listen(JNIEnv *env, jobject this, jint queuelen)
+_javanet_listen(JNIEnv *env, jobject thiz, jint queuelen)
 {
 #ifndef WITHOUT_NETWORK
   int fd;
@@ -742,7 +742,7 @@
   assert((*env)!=NULL);
 
   /* Get the real file descriptor */
-  fd = _javanet_get_int_field(env, this, "native_fd");
+  fd = _javanet_get_int_field(env, thiz, "native_fd");
   if (fd == -1)
     { 
       JCL_ThrowException(env, IO_EXCEPTION, 
@@ -768,7 +768,7 @@
  * object. Note that we assume this is a PlainSocketImpl just like us
  */
 void 
-_javanet_accept(JNIEnv *env, jobject this, jobject impl)
+_javanet_accept(JNIEnv *env, jobject thiz, jobject impl)
 {
 #ifndef WITHOUT_NETWORK
   int fd, newfd;
@@ -780,7 +780,7 @@
   assert((*env)!=NULL);
 
   /* Get the real file descriptor */
-  fd = _javanet_get_int_field(env, this, "native_fd");
+  fd = _javanet_get_int_field(env, thiz, "native_fd");
   if (fd == -1)
     { 
       JCL_ThrowException(env, IO_EXCEPTION, 
@@ -873,7 +873,7 @@
  * The actual number of bytes read is returned.
  */
 int
-_javanet_recvfrom(JNIEnv *env, jobject this, jarray buf, int offset, int len,
+_javanet_recvfrom(JNIEnv *env, jobject thiz, jarray buf, int offset, int len,
                   int *addr, int *port)
 {
 #ifndef WITHOUT_NETWORK
@@ -888,7 +888,7 @@
   DBG("_javanet_recvfrom(): Entered _javanet_recvfrom\n");
 
   /* Get the real file descriptor */
-  fd = _javanet_get_int_field(env, this, "native_fd");
+  fd = _javanet_get_int_field(env, thiz, "native_fd");
   if (fd == -1)
     { 
       JCL_ThrowException(env, IO_EXCEPTION, 
@@ -953,7 +953,7 @@
  * port - The port number to send to (may be 0)
  */
 void 
-_javanet_sendto(JNIEnv *env, jobject this, jarray buf, int offset, int len,
+_javanet_sendto(JNIEnv *env, jobject thiz, jarray buf, int offset, int len,
                 int addr, int port)
 {
 #ifndef WITHOUT_NETWORK
@@ -965,7 +965,7 @@
   assert((*env)!=NULL);
 
   /* Get the real file descriptor */
-  fd = _javanet_get_int_field(env, this, "native_fd");
+  fd = _javanet_get_int_field(env, thiz, "native_fd");
   if (fd == -1)
     { 
       JCL_ThrowException(env, IO_EXCEPTION, 
@@ -1008,7 +1008,7 @@
  * Sets the specified option for a socket
  */
 void 
-_javanet_set_option(JNIEnv *env, jobject this, jint option_id, jobject val)
+_javanet_set_option(JNIEnv *env, jobject thiz, jint option_id, jobject val)
 {
 #ifndef WITHOUT_NETWORK
   int       fd;
@@ -1022,7 +1022,7 @@
   assert((*env)!=NULL);
 
   /* Get the real file descriptor */
-  fd = _javanet_get_int_field(env, this, "native_fd");
+  fd = _javanet_get_int_field(env, thiz, "native_fd");
   if (fd == -1)
     { 
       JCL_ThrowException(env, IO_EXCEPTION, 
@@ -1197,7 +1197,7 @@
  * Retrieves the specified option values for a socket
  */
 jobject 
-_javanet_get_option(JNIEnv *env, jobject this, jint option_id)
+_javanet_get_option(JNIEnv *env, jobject thiz, jint option_id)
 {
 #ifndef WITHOUT_NETWORK
   int fd;
@@ -1209,7 +1209,7 @@
   assert((*env)!=NULL);
 
   /* Get the real file descriptor */
-  fd = _javanet_get_int_field(env, this, "native_fd");
+  fd = _javanet_get_int_field(env, thiz, "native_fd");
   if (fd == -1)
     { 
       JCL_ThrowException(env, SOCKET_EXCEPTION, 
cvs server: Diffing native/jni/java-nio
Index: native/jni/java-nio/java_nio_DirectByteBufferImpl.c
===================================================================
RCS file: 
/cvsroot/classpath/classpath/native/jni/java-nio/java_nio_DirectByteBufferImpl.c,v
retrieving revision 1.5
diff -u -r1.5 java_nio_DirectByteBufferImpl.c
--- native/jni/java-nio/java_nio_DirectByteBufferImpl.c 29 Mar 2004 07:07:39 
-0000      1.5
+++ native/jni/java-nio/java_nio_DirectByteBufferImpl.c 7 Apr 2004 16:22:07 
-0000
@@ -46,27 +46,27 @@
 #define IO_EXCEPTION "java/io/IOException"
 
 JNIEXPORT jobject JNICALL
-Java_java_nio_DirectByteBufferImpl_allocateImpl (JNIEnv *env, jclass class, 
jint size)
+Java_java_nio_DirectByteBufferImpl_allocateImpl (JNIEnv *env, jclass clazz, 
jint size)
 {
   JCL_ThrowException (env, IO_EXCEPTION, 
"java.nio.DirectByteBufferImpl.allocateImpl(): not implemented");
   return 0;
 }
 
 JNIEXPORT void JNICALL
-Java_java_nio_DirectByteBufferImpl_freeImpl (JNIEnv *env, jclass class, 
jobject address)
+Java_java_nio_DirectByteBufferImpl_freeImpl (JNIEnv *env, jclass clazz, 
jobject address)
 {
   JCL_ThrowException (env, IO_EXCEPTION, 
"java.nio.DirectByteBufferImpl.freeImpl(): not implemented");
 }
 
 JNIEXPORT jbyte JNICALL
-Java_java_nio_DirectByteBufferImpl_getImpl (JNIEnv *env, jclass class, jint 
index)
+Java_java_nio_DirectByteBufferImpl_getImpl (JNIEnv *env, jclass clazz, jint 
index)
 {
   JCL_ThrowException (env, IO_EXCEPTION, 
"java.nio.DirectByteBufferImpl.getImpl(): not implemented");
   return 0;
 }
 
 JNIEXPORT void JNICALL
-Java_java_nio_DirectByteBufferImpl_putImpl (JNIEnv *env, jclass class, jint 
index, jbyte value)
+Java_java_nio_DirectByteBufferImpl_putImpl (JNIEnv *env, jclass clazz, jint 
index, jbyte value)
 {
   JCL_ThrowException (env, IO_EXCEPTION, 
"java.nio.DirectByteBufferImpl.putImpl(): not implemented");
 }
Index: native/jni/java-nio/java_nio_FileChannelImpl.c
===================================================================
RCS file: 
/cvsroot/classpath/classpath/native/jni/java-nio/java_nio_FileChannelImpl.c,v
retrieving revision 1.8
diff -u -r1.8 java_nio_FileChannelImpl.c
--- native/jni/java-nio/java_nio_FileChannelImpl.c      29 Mar 2004 07:07:39 
-0000      1.8
+++ native/jni/java-nio/java_nio_FileChannelImpl.c      7 Apr 2004 16:22:07 
-0000
@@ -87,14 +87,14 @@
 Java_java_nio_channels_FileChannelImpl_nio_1unmmap_1file (JNIEnv *env, jclass 
clazz, jobject map_address, jint size)
 {
   JCL_ThrowException (env, IO_EXCEPTION, 
"java.nio.FileChannelImpl.nio_unmmap_file(): not implemented");
-  return 0;
+  return;
 }
 
 JNIEXPORT void JNICALL
 Java_java_nio_channels_FileChannelImpl_nio_1msync (JNIEnv *env, jclass clazz, 
jobject map_address, jint length)
 {
   JCL_ThrowException (env, IO_EXCEPTION, 
"java.nio.FileChannelImpl.nio_msync(): not implemented");
-  return 0;
+  return;
 }
 
 JNIEXPORT jint JNICALL
Index: native/jni/java-nio/java_nio_FileLockImpl.c
===================================================================
RCS file: 
/cvsroot/classpath/classpath/native/jni/java-nio/java_nio_FileLockImpl.c,v
retrieving revision 1.3
diff -u -r1.3 java_nio_FileLockImpl.c
--- native/jni/java-nio/java_nio_FileLockImpl.c 29 Mar 2004 07:07:39 -0000      
1.3
+++ native/jni/java-nio/java_nio_FileLockImpl.c 7 Apr 2004 16:22:07 -0000
@@ -46,7 +46,7 @@
 #define IO_EXCEPTION "java/io/IOException"
 
 JNIEXPORT void JNICALL
-Java_gnu_java_nio_FileLockImpl_releaseImpl (JNIEnv *env, jclass class)
+Java_gnu_java_nio_FileLockImpl_releaseImpl (JNIEnv *env, jclass clazz)
 {
   JCL_ThrowException (env, IO_EXCEPTION, "java.nio.FileChannelImpl.(): not 
implemented");
 }
cvs server: Diffing native/jni/java-util

reply via email to

[Prev in Thread] Current Thread [Next in Thread]