mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Remove the pointless terminator from ConstantSpec slices.
This commit is contained in:
parent
0c54cd1634
commit
ba68203ebf
2 changed files with 10 additions and 16 deletions
|
@ -1073,7 +1073,7 @@ class PropertyDefiner:
|
|||
specTemplate is a template for each entry of the spec array
|
||||
|
||||
specTerminator is a terminator for the spec array (inserted at the end
|
||||
of the array)
|
||||
of the array), or None
|
||||
|
||||
specType is the actual typename of our spec
|
||||
|
||||
|
@ -1086,7 +1086,8 @@ class PropertyDefiner:
|
|||
|
||||
for member in array:
|
||||
specs.append(specTemplate % getDataTuple(member))
|
||||
specs.append(specTerminator)
|
||||
if specTerminator:
|
||||
specs.append(specTerminator)
|
||||
|
||||
return (("static %s: [%s, ..%i] = [\n" +
|
||||
",\n".join(specs) + "\n" +
|
||||
|
@ -1254,7 +1255,7 @@ class ConstDefiner(PropertyDefiner):
|
|||
return decls + self.generatePrefableArray(
|
||||
array, name,
|
||||
' ConstantSpec { name: &%s_name as *u8 as *libc::c_char, value: %s }',
|
||||
' ConstantSpec { name: 0 as *libc::c_char, value: VoidVal }',
|
||||
None,
|
||||
'ConstantSpec',
|
||||
specData)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue