DEVTOOLS: Fix arg parsing in director-generate-xobj-stub

This commit is contained in:
Scott Percival 2024-01-12 18:41:12 +08:00 committed by Eugene Sandulenko
parent 9513dfbf56
commit 29ceaeea62

View File

@ -569,8 +569,12 @@ def generate_xobject_stubs(
elems = e.split()
if not elems or elems[0].startswith("--"):
continue
returnval = elems[0][0]
args = elems[0][1:]
first = elems[0]
if first.startswith("/"):
first = first[1:]
returnval = first[0]
args = first[1:]
methname = elems[1].split(",")[0]
if methname.startswith("+"):
methname = methname[1:]
@ -585,7 +589,6 @@ def generate_xobject_stubs(
default='""' if returnval == "S" else "0",
)
)
xobject_class = f"{name}XObject"
xobj_class = f"{name}XObj"