mirror of
https://github.com/servo/servo.git
synced 2025-06-15 03:44:30 +00:00
Inline dataLoc in the one place that can see it and the one place that can't.
This commit is contained in:
parent
eab9fd765c
commit
8b5778993a
1 changed files with 4 additions and 5 deletions
|
@ -1255,7 +1255,6 @@ for (uint32_t i = 0; i < length; ++i) {
|
|||
else:
|
||||
assert(defaultValue is None or
|
||||
not isinstance(defaultValue, IDLNullValue))
|
||||
dataLoc = "${declName}"
|
||||
#XXXjdm conversionBehavior should be used
|
||||
successVal = "v"
|
||||
if preSuccess or postSuccess:
|
||||
|
@ -1263,8 +1262,8 @@ for (uint32_t i = 0; i < length; ++i) {
|
|||
template = (
|
||||
"match JSValConvertible::from_jsval(cx, ${val}) {\n"
|
||||
" Err(_) => %s,\n"
|
||||
" Ok(v) => %s = %s\n"
|
||||
"}" % (failureCode, dataLoc, successVal))
|
||||
" Ok(v) => ${declName} = %s\n"
|
||||
"}" % (failureCode, successVal))
|
||||
declType = CGGeneric(typeName)
|
||||
if (defaultValue is not None and
|
||||
# We already handled IDLNullValue, so just deal with the other ones
|
||||
|
@ -1279,8 +1278,8 @@ for (uint32_t i = 0; i < length; ++i) {
|
|||
pre="if ${haveValue} {\n",
|
||||
post=("\n"
|
||||
"} else {\n"
|
||||
" %s = %s;\n"
|
||||
"}" % (dataLoc, defaultStr))).define()
|
||||
" ${declName} = %s;\n"
|
||||
"}" % defaultStr)).define()
|
||||
|
||||
initialVal = "false" if typeName == "bool" else ("0 as %s" % typeName)
|
||||
if type.nullable():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue