[kaffe] CVS kaffe (kaz): libraries/javalib/vmspecific/java/net/VMInetAddress.java
Kaffe CVS
cvs-commits at kaffe.org
Thu Jan 11 07:14:20 PST 2007
PatchSet 7467
Date: 2007/01/11 15:13:31
Author: kaz
Branch: HEAD
Tag: (none)
Log:
2007-01-11 Ito Kazumitsu <kaz at maczuka.gcd.org>
* libraries/javalib/vmspecific/java/net/VMInetAddress.java
(getHostByName): Convert the type of the reisult from Object[]
to byte[][].
Members:
ChangeLog:1.4967->1.4968
libraries/javalib/vmspecific/java/net/VMInetAddress.java:1.2->1.3
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4967 kaffe/ChangeLog:1.4968
--- kaffe/ChangeLog:1.4967 Tue Jan 9 23:45:17 2007
+++ kaffe/ChangeLog Thu Jan 11 15:13:31 2007
@@ -1,3 +1,9 @@
+2007-01-11 Ito Kazumitsu <kaz at maczuka.gcd.org>
+
+ * libraries/javalib/vmspecific/java/net/VMInetAddress.java
+ (getHostByName): Convert the type of the reisult from Object[]
+ to byte[][].
+
2007-01-08 Dalibor Topic <robilad at kaffe.org>
* developers/autogen.sh, FAQ/FAQ.automake:
Index: kaffe/libraries/javalib/vmspecific/java/net/VMInetAddress.java
diff -u kaffe/libraries/javalib/vmspecific/java/net/VMInetAddress.java:1.2 kaffe/libraries/javalib/vmspecific/java/net/VMInetAddress.java:1.3
--- kaffe/libraries/javalib/vmspecific/java/net/VMInetAddress.java:1.2 Wed Jan 3 23:02:34 2007
+++ kaffe/libraries/javalib/vmspecific/java/net/VMInetAddress.java Thu Jan 11 15:13:32 2007
@@ -120,7 +120,16 @@
public static byte[][] getHostByName(String hostname)
throws UnknownHostException
{
- return impl.getHostByName(hostname);
+ // impl.getHostByName(hostname) returns byte[][],
+ // but it may look like Object[].
+ // See include/Arrays.h -- HArrayOfArray and HArrayOfObject are identical.
+ Object[] addrobjs = impl.getHostByName(hostname);
+ byte[][] addrs = new byte[addrobjs.length][];
+ for (int i = 0; i < addrs.length; i++)
+ {
+ addrs[i] = (byte[]) addrobjs[i];
+ }
+ return addrs;
}
/**
More information about the kaffe
mailing list