[pushed] Remove some unnecessary qualification from printing.py

Message ID 20230926155306.3191010-1-tromey@adacore.com
State New
Headers
Series [pushed] Remove some unnecessary qualification from printing.py |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm warning Patch is already merged

Commit Message

Tom Tromey Sept. 26, 2023, 3:53 p.m. UTC
  printing.py references "gdb.printing" in a few spots, but there's no
need for this.  I think this is leftover from when this code was
(briefly) in some other module.  This patch removes the unnecessary
qualifications.  Tested on x86-64 Fedora 36.
---
 gdb/python/lib/gdb/printing.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
  

Patch

diff --git a/gdb/python/lib/gdb/printing.py b/gdb/python/lib/gdb/printing.py
index 0bbe2cb8ae7..dec1351c2d7 100644
--- a/gdb/python/lib/gdb/printing.py
+++ b/gdb/python/lib/gdb/printing.py
@@ -367,15 +367,15 @@  def make_visualizer(value):
     else:
         ty = value.type.strip_typedefs()
         if ty.is_string_like:
-            result = gdb.printing.NoOpScalarPrinter(value)
+            result = NoOpScalarPrinter(value)
         elif ty.code == gdb.TYPE_CODE_ARRAY:
-            result = gdb.printing.NoOpArrayPrinter(ty, value)
+            result = NoOpArrayPrinter(ty, value)
         elif ty.is_array_like:
             value = value.to_array()
             ty = value.type.strip_typedefs()
-            result = gdb.printing.NoOpArrayPrinter(ty, value)
+            result = NoOpArrayPrinter(ty, value)
         elif ty.code in (gdb.TYPE_CODE_STRUCT, gdb.TYPE_CODE_UNION):
-            result = gdb.printing.NoOpStructPrinter(ty, value)
+            result = NoOpStructPrinter(ty, value)
         elif ty.code in (
             gdb.TYPE_CODE_PTR,
             gdb.TYPE_CODE_REF,
@@ -383,7 +383,7 @@  def make_visualizer(value):
         ):
             result = NoOpPointerReferencePrinter(value)
         else:
-            result = gdb.printing.NoOpScalarPrinter(value)
+            result = NoOpScalarPrinter(value)
     return result