mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 23:27:30 +09:00
Support string default values for unions containing USVString
This commit is contained in:
parent
f8d473c3c9
commit
a3f38ee838
1 changed files with 3 additions and 1 deletions
|
|
@ -4355,7 +4355,9 @@ def handleDefaultStringValue(defaultValue, method):
|
||||||
passing as the second argument of handleDefault; in particular it does not
|
passing as the second argument of handleDefault; in particular it does not
|
||||||
end with a ';'
|
end with a ';'
|
||||||
"""
|
"""
|
||||||
assert defaultValue.type.isDOMString() or defaultValue.type.isByteString()
|
assert (defaultValue.type.isDOMString() or
|
||||||
|
defaultValue.type.isUSVString() or
|
||||||
|
defaultValue.type.isByteString())
|
||||||
return ("static const %(char_t)s data[] = { %(data)s };\n"
|
return ("static const %(char_t)s data[] = { %(data)s };\n"
|
||||||
"%(method)s(data, ArrayLength(data) - 1)") % {
|
"%(method)s(data, ArrayLength(data) - 1)") % {
|
||||||
'char_t': "char" if defaultValue.type.isByteString() else "char16_t",
|
'char_t': "char" if defaultValue.type.isByteString() else "char16_t",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue