diff options
author | Björn Gustavsson <[email protected]> | 2014-08-18 15:59:21 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-09-01 14:37:14 +0200 |
commit | 5095efaac2920677510971f08908e97f379c7c3f (patch) | |
tree | 25adf22629051fca7a4ac20328ac88f97eeec73b /lib/asn1 | |
parent | 155156563429fbb8535ca35491d8057d78aa272c (diff) | |
download | otp-5095efaac2920677510971f08908e97f379c7c3f.tar.gz otp-5095efaac2920677510971f08908e97f379c7c3f.tar.bz2 otp-5095efaac2920677510971f08908e97f379c7c3f.zip |
Add the module name to the #classdef{} record
If we want construct an #'Externaltypereference'{} from
a #classdef{} record, we will need the module name.
Diffstat (limited to 'lib/asn1')
-rw-r--r-- | lib/asn1/src/asn1_records.hrl | 2 | ||||
-rw-r--r-- | lib/asn1/src/asn1ct_check.erl | 2 | ||||
-rw-r--r-- | lib/asn1/src/asn1ct_parser2.erl | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/asn1/src/asn1_records.hrl b/lib/asn1/src/asn1_records.hrl index d6cfd4dc02..6c1cf1b12a 100644 --- a/lib/asn1/src/asn1_records.hrl +++ b/lib/asn1/src/asn1_records.hrl @@ -37,7 +37,7 @@ -record('ObjectClassFieldType',{classname,class,fieldname,type}). -record(typedef,{checked=false,pos,name,typespec}). --record(classdef,{checked=false,pos,name,typespec}). +-record(classdef, {checked=false,pos,name,module,typespec}). -record(valuedef,{checked=false,pos,name,type,value,module}). -record(ptypedef,{checked=false,pos,name,args,typespec}). -record(pvaluedef,{checked=false,pos,name,args,type,value}). diff --git a/lib/asn1/src/asn1ct_check.erl b/lib/asn1/src/asn1ct_check.erl index c2673e3eba..e457e79c81 100644 --- a/lib/asn1/src/asn1ct_check.erl +++ b/lib/asn1/src/asn1ct_check.erl @@ -7008,7 +7008,7 @@ include_default_class1(_,[]) -> include_default_class1(Module,[{Name,TS}|Rest]) -> case asn1_db:dbget(Module,Name) of undefined -> - C = #classdef{checked=true,name=Name, + C = #classdef{checked=true,module=Module,name=Name, typespec=TS}, asn1_db:dbput(Module,Name,C); _ -> ok diff --git a/lib/asn1/src/asn1ct_parser2.erl b/lib/asn1/src/asn1ct_parser2.erl index f6374da52e..14b90e6748 100644 --- a/lib/asn1/src/asn1ct_parser2.erl +++ b/lib/asn1/src/asn1ct_parser2.erl @@ -1055,7 +1055,8 @@ parse_DefinedObjectClass(Tokens) -> parse_ObjectClassAssignment([{typereference,L1,ObjClName},{'::=',_}|Rest]) -> {Type,Rest2} = parse_ObjectClass(Rest), - {#classdef{pos=L1,name=ObjClName,typespec=Type},Rest2}; + {#classdef{pos=L1,name=ObjClName,module=resolve_module(Type), + typespec=Type},Rest2}; parse_ObjectClassAssignment(Tokens) -> throw({asn1_assignment_error,{get_line(hd(Tokens)),get(asn1_module), [got,get_token(hd(Tokens)),expected, |