aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1_records.hrl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-02-26 08:44:25 +0100
committerBjörn Gustavsson <[email protected]>2013-05-31 14:52:16 +0200
commit9972afbb35b4f4d40aefce37f5220a26c91e19ac (patch)
tree29243519bea37682a959fadf206c22895bb24c63 /lib/asn1/src/asn1_records.hrl
parentf84849cb7d2579d4f0d07595d2a15b49c1178868 (diff)
downloadotp-9972afbb35b4f4d40aefce37f5220a26c91e19ac.tar.gz
otp-9972afbb35b4f4d40aefce37f5220a26c91e19ac.tar.bz2
otp-9972afbb35b4f4d40aefce37f5220a26c91e19ac.zip
Eliminate use of #constraint{} outside of the parser
The record #constraint{} is almost unused outside of the parser except for two places in asn1ct_check. The only correct usage of the record is in instance_of_constraints/2. Eliminate that usage by updating the parser to pass that constraint in the same way as all other constraints. In check_integer_range/2, the record is used incorrectly. A constraint for an integer will never be a list of #constraint{} records. Therefore, the list comprehension will always produce an empty list, and check_constr/2 will not actually check anything (which is kind of lucky, since the 'ValueRange' range constraint is incorrectly written - the lower and upper bounds should be in a tuple). For now, we will not attempt to actually start validating integer ranges. Firstly (obviously) we will need to be sure that we correctly handles all forms of constraints, and secondly we will need to consider whether we need to produce a warning rather than an error for compatibility reasons.
Diffstat (limited to 'lib/asn1/src/asn1_records.hrl')
-rw-r--r--lib/asn1/src/asn1_records.hrl1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/asn1/src/asn1_records.hrl b/lib/asn1/src/asn1_records.hrl
index 1dfe329f3b..396ba0fcfa 100644
--- a/lib/asn1/src/asn1_records.hrl
+++ b/lib/asn1/src/asn1_records.hrl
@@ -46,7 +46,6 @@
-record(pobjectsetdef,{checked=false,pos,name,args,class,def}).
-record(identifier,{pos,val}).
--record(constraint,{c,e}).
-record('Constraint',{'SingleValue'=no,'SizeConstraint'=no,'ValueRange'=no,'PermittedAlphabet'=no,
'ContainedSubtype'=no, 'TypeConstraint'=no,'InnerSubtyping'=no,e=no,'Other'=no}).
-record(simpletableattributes,{objectsetname,c_name,c_index,usedclassfield,