Add 64-bit integer support to ASN.1 compiler
ASN.1 INTEGERs will now compile to C int64_t or uint64_t, depending on whether the constraint ranges include numbers that cannot be represented in 32-bit ints and whether they include negative numbers. Template backend support included. check-template is now built with --template, so we know we're testing it. Tests included.
This commit is contained in:

committed by
Nicolas Williams

parent
0e7437ba2e
commit
19d378f44d
@@ -78,7 +78,7 @@ struct value {
|
||||
} type;
|
||||
union {
|
||||
int booleanvalue;
|
||||
int integervalue;
|
||||
int64_t integervalue;
|
||||
char *stringvalue;
|
||||
struct objid *objectidentifiervalue;
|
||||
} u;
|
||||
@@ -109,8 +109,12 @@ struct tagtype {
|
||||
};
|
||||
|
||||
struct range {
|
||||
int min;
|
||||
int max;
|
||||
/*
|
||||
* We can't represent unsigned 64-bit ranges because max might be
|
||||
* negative...
|
||||
*/
|
||||
int64_t min;
|
||||
int64_t max;
|
||||
};
|
||||
|
||||
enum ctype { CT_CONTENTS, CT_USER } ;
|
||||
|
Reference in New Issue
Block a user