Remove LA_PRINT_CHAR
authorTom Tromey <tom@tromey.com>
Sat, 22 Jan 2022 23:31:52 +0000 (16:31 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 14 Feb 2022 13:22:33 +0000 (06:22 -0700)
This removes the LA_PRINT_CHAR macro, in favor of using ordinary
method calls.

gdb/ada-valprint.c
gdb/c-valprint.c
gdb/language.h
gdb/typeprint.c
gdb/valprint.c

index adab6b42f5b8048ae32f744b9a74c705524b070f..a59c392bef4b60ea4f6655dcf339d9d8e6a6adc7 100644 (file)
@@ -402,7 +402,7 @@ ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream)
       break;
 
     case TYPE_CODE_CHAR:
-      LA_PRINT_CHAR (val, type, stream);
+      current_language->printchar (val, type, stream);
       break;
 
     case TYPE_CODE_BOOL:
index fadbc5b7022ca5405869f174557739604041dc69..047e5687b0aab35c38fe3b589fdf7921f802b35c 100644 (file)
@@ -409,7 +409,8 @@ c_value_print_int (struct value *val, struct ui_file *stream,
       if (c_textual_element_type (type, options->format))
        {
          fputs_filtered (" ", stream);
-         LA_PRINT_CHAR (unpack_long (type, valaddr), type, stream);
+         current_language->printchar (unpack_long (type, valaddr), type,
+                                      stream);
        }
     }
 }
index 3930f5bd22307585cc3c12ac73ee6560b03a5a05..4eb414bbe127e2eb4e9e2f5d3afaaf9b1d037b54 100644 (file)
@@ -755,8 +755,6 @@ extern enum language set_language (enum language);
    the current setting of working_lang, which the user sets
    with the "set language" command.  */
 
-#define LA_PRINT_CHAR(ch, type, stream) \
-  (current_language->printchar (ch, type, stream))
 #define LA_PRINT_STRING(stream, elttype, string, length, encoding, force_ellipses, options) \
   (current_language->printstr (stream, elttype, string, length, \
                               encoding, force_ellipses,options))
index c15a9c6b59f95bdbb560c8469fa928b2420c63ad..8cb34ad1921ce65057c853cb1d068e37078572bc 100644 (file)
@@ -647,7 +647,7 @@ print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
       break;
 
     case TYPE_CODE_CHAR:
-      LA_PRINT_CHAR ((unsigned char) val, type, stream);
+      current_language->printchar ((unsigned char) val, type, stream);
       break;
 
     case TYPE_CODE_BOOL:
index 25e4a8dc8e15dffdaa3a83ed265be2f1bf8bfe42..07bc324be5db015a3ec2c4fe8f3b891c80ac2ba3 100644 (file)
@@ -791,7 +791,7 @@ generic_value_print_char (struct value *value, struct ui_file *stream,
       else
        fprintf_filtered (stream, "%d", (int) val);
       fputs_filtered (" ", stream);
-      LA_PRINT_CHAR (val, unresolved_type, stream);
+      current_language->printchar (val, unresolved_type, stream);
     }
 }