Commit 8a7bf9c9 authored by dbarbera's avatar dbarbera
Browse files

Normalize dash characters in ASN.1 constant names

parent 5bb148ab
...@@ -415,8 +415,9 @@ def _process(process, ctx=None): ...@@ -415,8 +415,9 @@ def _process(process, ctx=None):
# Generate ASN.1 constants # Generate ASN.1 constants
for name, t in process.dv.variables.viewitems(): for name, t in process.dv.variables.viewitems():
var_llty = ctx.lltype_of(t.type) var_llty = ctx.lltype_of(t.type)
global_var = ctx.module.add_global_variable(var_llty, str(name)) name = str(name).replace('-', '_').lower()
ctx.scope.define(str(name).lower(), global_var) global_var = ctx.module.add_global_variable(var_llty, name)
ctx.scope.define(name, global_var)
# Generare process-level vars # Generare process-level vars
for name, (asn1ty, expr) in process.variables.viewitems(): for name, (asn1ty, expr) in process.variables.viewitems():
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment