@@ -212,7 +212,6 @@ def __classify_struct(self):
212212 # REGULAR STRUCT
213213 return TYPE_KIND_REGULAR_STRUCT
214214
215-
216215 def __classify_union (self ):
217216 assert self .get_dwarf_type_kind () == DWARF_TYPE_CODE_UNION
218217
@@ -233,7 +232,6 @@ def __classify_union(self):
233232 else :
234233 return TYPE_KIND_REGULAR_UNION
235234
236-
237235 def __conforms_to_field_layout (self , expected_fields ):
238236 actual_fields = self .get_fields ()
239237 actual_field_count = len (actual_fields )
@@ -363,6 +361,7 @@ def extract_tail_head_ptr_and_cap_from_std_vecdeque(vec_val):
363361 assert data_ptr .type .get_dwarf_type_kind () == DWARF_TYPE_CODE_PTR
364362 return (tail , head , data_ptr , capacity )
365363
364+
366365def extract_length_and_ptr_from_slice (slice_val ):
367366 assert (slice_val .type .get_type_kind () == TYPE_KIND_SLICE or
368367 slice_val .type .get_type_kind () == TYPE_KIND_STR_SLICE )
@@ -376,8 +375,10 @@ def extract_length_and_ptr_from_slice(slice_val):
376375 assert data_ptr .type .get_dwarf_type_kind () == DWARF_TYPE_CODE_PTR
377376 return (length , data_ptr )
378377
378+
379379UNQUALIFIED_TYPE_MARKERS = frozenset (["(" , "[" , "&" , "*" ])
380380
381+
381382def extract_type_name (qualified_type_name ):
382383 """Extracts the type name from a fully qualified path"""
383384 if qualified_type_name [0 ] in UNQUALIFIED_TYPE_MARKERS :
@@ -393,6 +394,7 @@ def extract_type_name(qualified_type_name):
393394 else :
394395 return qualified_type_name [index + 2 :]
395396
397+
396398try :
397399 compat_str = unicode # Python 2
398400except NameError :
0 commit comments