* jv-valprint.c (java_value_print): Look at TYPE_TAG_NAME, not

TYPE_NAME, when printing a String value.  PR java/1075.
This commit is contained in:
Tom Tromey 2003-02-21 02:49:12 +00:00
parent d38074a8d5
commit d4cad8db8c
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2003-02-20 Tom Tromey <tromey@redhat.com>
* jv-valprint.c (java_value_print): Look at TYPE_TAG_NAME, not
TYPE_NAME, when printing a String value. PR java/1075.
2003-02-20 Adam Fedor <fedor@gnu.org>
* objc-lang.h (find_methods): Remove declaration.

View file

@ -199,8 +199,9 @@ java_value_print (struct value *val, struct ui_file *stream, int format,
if (TYPE_CODE (type) == TYPE_CODE_PTR
&& TYPE_TARGET_TYPE (type)
&& TYPE_NAME (TYPE_TARGET_TYPE (type))
&& strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)), "java.lang.String") == 0
&& TYPE_TAG_NAME (TYPE_TARGET_TYPE (type))
&& strcmp (TYPE_TAG_NAME (TYPE_TARGET_TYPE (type)),
"java.lang.String") == 0
&& (format == 0 || format == 's')
&& address != 0
&& value_as_address (val) != 0)