Commit adbb9924 authored by dbarbera's avatar dbarbera
Browse files

Prepend asn1Scc prefix to ASN.1 type functions

parent 16032e15
...@@ -153,7 +153,7 @@ class Context(): ...@@ -153,7 +153,7 @@ class Context():
struct = self.decl_struct(['arr'], [array_ty], name) struct = self.decl_struct(['arr'], [array_ty], name)
struct_ptr = core.Type.pointer(struct.ty) struct_ptr = core.Type.pointer(struct.ty)
self.decl_func("%s_Equal" % name, self.i1, [struct_ptr, struct_ptr]) self.decl_func("asn1Scc%s_Equal" % name, self.i1, [struct_ptr, struct_ptr])
return struct.ty return struct.ty
...@@ -169,7 +169,7 @@ class Context(): ...@@ -169,7 +169,7 @@ class Context():
struct = self.decl_struct(field_names, field_types, name) struct = self.decl_struct(field_names, field_types, name)
struct_ptr = core.Type.pointer(struct.ty) struct_ptr = core.Type.pointer(struct.ty)
self.decl_func("%s_Equal" % name, self.i1, [struct_ptr, struct_ptr]) self.decl_func("asn1Scc%s_Equal" % name, self.i1, [struct_ptr, struct_ptr])
return struct.ty return struct.ty
...@@ -188,7 +188,7 @@ class Context(): ...@@ -188,7 +188,7 @@ class Context():
union = self.decl_union(field_names, field_types, name) union = self.decl_union(field_names, field_types, name)
union_ptr = core.Type.pointer(union.ty) union_ptr = core.Type.pointer(union.ty)
self.decl_func("%s_Equal" % name, self.i1, [union_ptr, union_ptr]) self.decl_func("asn1Scc%s_Equal" % name, self.i1, [union_ptr, union_ptr])
return union.ty return union.ty
...@@ -206,7 +206,7 @@ class Context(): ...@@ -206,7 +206,7 @@ class Context():
struct = self.decl_struct(['arr'], [array_ty], name) struct = self.decl_struct(['arr'], [array_ty], name)
struct_ptr = core.Type.pointer(struct.ty) struct_ptr = core.Type.pointer(struct.ty)
self.decl_func("%s_Equal" % name, self.i1, [struct_ptr, struct_ptr]) self.decl_func("asn1Scc%s_Equal" % name, self.i1, [struct_ptr, struct_ptr])
return struct.ty return struct.ty
...@@ -1030,7 +1030,7 @@ def _basic(expr): ...@@ -1030,7 +1030,7 @@ def _basic(expr):
elif is_struct_ptr(lefttmp): elif is_struct_ptr(lefttmp):
if expr.operand in ['=', '/=']: if expr.operand in ['=', '/=']:
type_name = expr.left.exprType.ReferencedTypeName.replace('-', '_').lower() type_name = expr.left.exprType.ReferencedTypeName.replace('-', '_').lower()
func = ctx.funcs["%s_equal" % type_name] func = ctx.funcs["asn1scc%s_equal" % type_name]
res_val = ctx.builder.call(func, [lefttmp, righttmp]) res_val = ctx.builder.call(func, [lefttmp, righttmp])
return ctx.builder.not_(res_val) if expr.operand == '/=' else res_val return ctx.builder.not_(res_val) if expr.operand == '/=' else res_val
else: else:
......
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