Skip to content

Commit

Permalink
Remove SubTypedefs thing
Browse files Browse the repository at this point in the history
- Doesn't seem useful
  • Loading branch information
virtuald committed Dec 5, 2022
1 parent 8d4abd7 commit da1a074
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions CppHeaderParser/CppHeaderParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,6 @@ class Resolver(object):
C_KEYWORDS = "extern virtual static explicit inline friend constexpr".split()
C_KEYWORDS = set(C_KEYWORDS)

SubTypedefs = {} # TODO deprecate?
NAMESPACES = []
CLASSES = {}

Expand Down Expand Up @@ -1878,21 +1877,6 @@ def finalize_vars(self):
var["ctypes_type"] = "ctypes.c_void_p"
var["unresolved"] = True

elif tag in self.SubTypedefs: # TODO remove SubTypedefs
if (
"property_of_class" in var
or "property_of_struct" in var
):
trace_print(
"class:", self.SubTypedefs[tag], "tag:", tag
)
var["typedef"] = self.SubTypedefs[tag] # class name
var["ctypes_type"] = "ctypes.c_void_p"
else:
trace_print("WARN-this should almost never happen!")
trace_print(var)
var["unresolved"] = True

elif tag in self._template_typenames:
var["typename"] = tag
var["ctypes_type"] = "ctypes.c_void_p"
Expand Down Expand Up @@ -2069,10 +2053,6 @@ def finalize(self):
trace_print("meth returns class:", meth["returns"])
meth["returns_class"] = True

elif meth["returns"] in self.SubTypedefs:
meth["returns_class"] = True
meth["returns_nested"] = self.SubTypedefs[meth["returns"]]

elif meth["returns"] in cls._public_enums:
enum = cls._public_enums[meth["returns"]]
meth["returns_enum"] = enum.get("type")
Expand Down Expand Up @@ -2481,7 +2461,6 @@ def _evaluate_property_stack(self, clearStack=True, addToVar=None):
klass["typedefs"][self.curAccessSpecifier].append(name)
if self.curAccessSpecifier == "public":
klass._public_typedefs[name] = typedef["type"]
Resolver.SubTypedefs[name] = self.curClass
else:
assert 0
elif self.curClass:
Expand Down

0 comments on commit da1a074

Please sign in to comment.