INNER CODE UNIT · Python
load_json
SedulousWorks/SedulousEngine · Dependencies/cimgui-Beef/generate_bindings.py:126
def load_json(filename):
path = os.path.join(JSON_DIR, filename)
with open(path, "r") as f:
return json.load(f)
def strip_all_const(t):
"""Thoroughly strip all const qualifiers from a type string."""
# Remove 'const ' prefix/infix
t = t.replace("const ", " ")
# Remove trailing 'const' (e.g., "char*const")
t = re.sub(r'\bconst\b', '', t)
# Clean up extra whitespace
t = re.sub(r'\s+', ' ', t).strip()
return t
def map_type(c_type):