mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 739760 - doubles and floats can't be used in dictionaries. r=khuey
This commit is contained in:
parent
02027b882a
commit
71e90e76a3
@ -335,6 +335,12 @@ def write_getter(a, iface, fd):
|
||||
fd.write(" aDict.%s = b;\n" % a.name)
|
||||
elif realtype.count("PRInt32"):
|
||||
fd.write(" NS_ENSURE_STATE(JS_ValueToECMAInt32(aCx, v, &aDict.%s));\n" % a.name)
|
||||
elif realtype.count("double"):
|
||||
fd.write(" NS_ENSURE_STATE(JS_ValueToNumber(aCx, v, &aDict.%s));\n" % a.name)
|
||||
elif realtype.count("float"):
|
||||
fd.write(" double d;\n")
|
||||
fd.write(" NS_ENSURE_STATE(JS_ValueToNumber(aCx, v, &d));")
|
||||
fd.write(" aDict.%s = (float) d;\n" % a.name)
|
||||
elif realtype.count("PRUint16"):
|
||||
fd.write(" uint32_t u;\n")
|
||||
fd.write(" NS_ENSURE_STATE(JS_ValueToECMAUint32(aCx, v, &u));\n")
|
||||
|
Loading…
Reference in New Issue
Block a user