Skip to content

Commit 22c66c4

Browse files
committed
modern style classes
1 parent 733fe1d commit 22c66c4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/etc/gdb_rust_pretty_printing.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def rust_pretty_printer_lookup_function(gdb_val):
170170
#=------------------------------------------------------------------------------
171171
# Pretty Printer Classes
172172
#=------------------------------------------------------------------------------
173-
class RustStructPrinter:
173+
class RustStructPrinter(object):
174174
def __init__(self, val, omit_first_field, omit_type_name, is_tuple_like):
175175
self.__val = val
176176
self.__omit_first_field = omit_first_field
@@ -205,7 +205,7 @@ def display_hint(self):
205205
return ""
206206

207207

208-
class RustSlicePrinter:
208+
class RustSlicePrinter(object):
209209
def __init__(self, val):
210210
self.__val = val
211211

@@ -227,7 +227,7 @@ def children(self):
227227
yield (str(index), (raw_ptr + index).dereference())
228228

229229

230-
class RustStringSlicePrinter:
230+
class RustStringSlicePrinter(object):
231231
def __init__(self, val):
232232
self.__val = val
233233

@@ -237,7 +237,7 @@ def to_string(self):
237237
return '"%s"' % raw_ptr.string(encoding="utf-8", length=length)
238238

239239

240-
class RustStdVecPrinter:
240+
class RustStdVecPrinter(object):
241241
def __init__(self, val):
242242
self.__val = val
243243

@@ -257,7 +257,7 @@ def children(self):
257257
yield (str(index), (gdb_ptr + index).dereference())
258258

259259

260-
class RustStdStringPrinter:
260+
class RustStdStringPrinter(object):
261261
def __init__(self, val):
262262
self.__val = val
263263

@@ -268,7 +268,7 @@ def to_string(self):
268268
length=length)
269269

270270

271-
class RustCStyleVariantPrinter:
271+
class RustCStyleVariantPrinter(object):
272272
def __init__(self, val):
273273
assert val.type.get_dwarf_type_kind() == rustpp.DWARF_TYPE_CODE_ENUM
274274
self.__val = val
@@ -277,7 +277,7 @@ def to_string(self):
277277
return str(self.__val.get_wrapped_value())
278278

279279

280-
class IdentityPrinter:
280+
class IdentityPrinter(object):
281281
def __init__(self, string):
282282
self.string = string
283283

0 commit comments

Comments
 (0)