mirror of
https://github.com/servo/servo.git
synced 2025-06-14 03:14:29 +00:00
Expose named constants in bindings.
This commit is contained in:
parent
082de0e252
commit
620755b95f
1 changed files with 1 additions and 1 deletions
|
@ -2994,7 +2994,7 @@ class CGConstant(CGThing):
|
|||
def stringDecl(const):
|
||||
name = const.identifier.name
|
||||
value = convertConstIDLValueToRust(const.value)
|
||||
return CGGeneric("static %s: %s = %s;\n" % (name, builtinNames[const.value.type.tag()], value))
|
||||
return CGGeneric("pub static %s: %s = %s;\n" % (name, builtinNames[const.value.type.tag()], value))
|
||||
|
||||
return CGIndenter(CGList(stringDecl(m) for m in self.constants)).define()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue