Skip to content

Commit

Permalink
Bugfixes for swig->json.
Browse files Browse the repository at this point in the history
* indentation fix (broken in python2->python3)
* don't generate projected members

indentation broke in casadi@bd1f6b4#diff-b2b612531fd32fdba0fb04c501742be3
  • Loading branch information
Greg Horn committed Dec 17, 2018
1 parent f18992c commit f32c473
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions swig/json/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ def getCanonicalParams(d,debug=""):
params = []
if d.find('attributelist/parmlist') is not None:
for x in d.findall('attributelist/parmlist/parm/attributelist/attribute[@name="type"]'):
name = x.findall('../attribute[@name="name"]')[0].attrib['value']
params.append( (getCanonicalType(x.attrib['value']),"Output" if name=="OUTPUT" else "Normal") )
name = x.findall('../attribute[@name="name"]')[0].attrib['value']
params.append( (getCanonicalType(x.attrib['value']),"Output" if name=="OUTPUT" else "Normal") )

return params
print("elpased", time.time()-t0)
Expand Down Expand Up @@ -213,7 +213,7 @@ def getCanonicalParams(d,debug=""):
storage = getAttribute(d,"storage")

access = getAttribute(d,"access")
if access=="private": continue
if access in ["private", "protected"]: continue

if dname == "ptr": continue # WORKAROUND FOR POTENTIAL SWIG BUG

Expand All @@ -235,7 +235,7 @@ def getCanonicalParams(d,debug=""):

rettype = name
access = getAttribute(d,"access")
if access=="private": continue
if access in ["private", "protected"]: continue

if is_internal(d,msg="constructors"):
numInternalConstructors += 1
Expand Down

0 comments on commit f32c473

Please sign in to comment.