rename name -> name_full

This commit is contained in:
2014-10-19 15:49:59 +02:00
parent 8caf67a354
commit e92c624df7

View File

@@ -484,15 +484,15 @@ class DNAName:
DNAName is a C-type name stored in the DNA DNAName is a C-type name stored in the DNA
""" """
__slots__ = ( __slots__ = (
"name", "name_full",
"name_only", "name_only",
"is_pointer", "is_pointer",
"is_method_pointer", "is_method_pointer",
"array_size", "array_size",
) )
def __init__(self, name): def __init__(self, name_full):
self.name = name self.name_full = name_full
self.name_only = self.calc_name_only() self.name_only = self.calc_name_only()
self.is_pointer = self.calc_is_pointer() self.is_pointer = self.calc_is_pointer()
self.is_method_pointer = self.calc_is_method_pointer() self.is_method_pointer = self.calc_is_method_pointer()
@@ -508,21 +508,21 @@ class DNAName:
return result return result
def calc_name_only(self): def calc_name_only(self):
result = self.name.strip(b'*()') result = self.name_full.strip(b'*()')
index = result.find(b'[') index = result.find(b'[')
if index != -1: if index != -1:
result = result[:index] result = result[:index]
return result return result
def calc_is_pointer(self): def calc_is_pointer(self):
return (b'*' in self.name) return (b'*' in self.name_full)
def calc_is_method_pointer(self): def calc_is_method_pointer(self):
return (b'(*' in self.name) return (b'(*' in self.name_full)
def calc_array_size(self): def calc_array_size(self):
result = 1 result = 1
temp = self.name temp = self.name_full
index = temp.find(b'[') index = temp.find(b'[')
while index != -1: while index != -1: