Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move as much data as possible into non-writable text by declaring it const #46

Merged
merged 6 commits into from
Oct 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions libasn1compiler/asn1c_C.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ asn1c_lang_C_type_common_INTEGER(arg_t *arg) {
*/
REDIR(OT_STAT_DEFS);

OUT("static asn_INTEGER_enum_map_t asn_MAP_%s_value2enum_%d[] = {\n",
OUT("static const asn_INTEGER_enum_map_t asn_MAP_%s_value2enum_%d[] = {\n",
MKID(expr), expr->_type_unique_index);
qsort(v2e, el_count, sizeof(v2e[0]), compar_enumMap_byValue);
for(eidx = 0; eidx < el_count; eidx++) {
Expand All @@ -189,7 +189,7 @@ asn1c_lang_C_type_common_INTEGER(arg_t *arg) {
OUT("\t/* This list is extensible */\n");
OUT("};\n");

OUT("static unsigned int asn_MAP_%s_enum2value_%d[] = {\n",
OUT("static const unsigned int asn_MAP_%s_enum2value_%d[] = {\n",
MKID(expr), expr->_type_unique_index);
qsort(v2e, el_count, sizeof(v2e[0]), compar_enumMap_byName);
for(eidx = 0; eidx < el_count; eidx++) {
Expand All @@ -202,7 +202,7 @@ asn1c_lang_C_type_common_INTEGER(arg_t *arg) {
OUT("\t/* This list is extensible */\n");
OUT("};\n");

OUT("static asn_INTEGER_specifics_t asn_SPC_%s_specs_%d = {\n",
OUT("static const asn_INTEGER_specifics_t asn_SPC_%s_specs_%d = {\n",
MKID(expr), expr->_type_unique_index);
INDENT(+1);
OUT("asn_MAP_%s_value2enum_%d,\t"
Expand Down Expand Up @@ -234,7 +234,7 @@ asn1c_lang_C_type_common_INTEGER(arg_t *arg) {
if(expr->expr_type == ASN_BASIC_INTEGER
&& asn1c_type_fits_long(arg, expr) == FL_FITS_UNSIGN) {
REDIR(OT_STAT_DEFS);
OUT("static asn_INTEGER_specifics_t asn_SPC_%s_specs_%d = {\n",
OUT("static const asn_INTEGER_specifics_t asn_SPC_%s_specs_%d = {\n",
MKID(expr), expr->_type_unique_index);
INDENT(+1);
OUT("0,\t");
Expand Down Expand Up @@ -383,7 +383,7 @@ asn1c_lang_C_type_SEQUENCE_def(arg_t *arg) {
int elm = 0;
int comma = 0;
comp_mode = 0;
OUT("static int asn_MAP_%s_oms_%d[] = {",
OUT("static const int asn_MAP_%s_oms_%d[] = {",
MKID(expr),
expr->_type_unique_index);
TQ_FOR(v, &(expr->members), next) {
Expand Down Expand Up @@ -628,7 +628,7 @@ asn1c_lang_C_type_SET_def(arg_t *arg) {
/*
* Emit a map of mandatory elements.
*/
OUT("static uint8_t asn_MAP_%s_mmap_%d",
OUT("static const uint8_t asn_MAP_%s_mmap_%d",
MKID(expr), expr->_type_unique_index);
p = MKID_safe(expr);
OUT("[(%d + (8 * sizeof(unsigned int)) - 1) / 8]", elements);
Expand Down Expand Up @@ -964,7 +964,7 @@ asn1c_lang_C_type_CHOICE_def(arg_t *arg) {
int i;
cmap = compute_canonical_members_order(arg, elements);
if(cmap) {
OUT("static int asn_MAP_%s_cmap_%d[] = {",
OUT("static const int asn_MAP_%s_cmap_%d[] = {",
MKID(expr),
expr->_type_unique_index);
for(i = 0; i < elements; i++) {
Expand Down Expand Up @@ -1661,7 +1661,7 @@ emit_tag2member_map(arg_t *arg, tag2el_t *tag2el, int tag2el_count, const char *

if(!tag2el_count) return 0; /* No top level tags */

OUT("static asn_TYPE_tag2member_t asn_MAP_%s_tag2el%s_%d[] = {\n",
OUT("static const asn_TYPE_tag2member_t asn_MAP_%s_tag2el%s_%d[] = {\n",
MKID(expr), opt_modifier?opt_modifier:"",
expr->_type_unique_index);
for(i = 0; i < tag2el_count; i++) {
Expand Down Expand Up @@ -1730,7 +1730,7 @@ emit_tags_vectors(arg_t *arg, asn1p_expr_t *expr, int *tags_count_r, int *all_ta
}

#define EMIT_TAGS_TABLE(name, tags, tags_count) do { \
OUT("static ber_tlv_tag_t asn_DEF_%s%s_tags_%d[] = {\n",\
OUT("static const ber_tlv_tag_t asn_DEF_%s%s_tags_%d[] = {\n",\
MKID(expr), name, \
expr->_type_unique_index); \
INDENT(+1); \
Expand Down
6 changes: 3 additions & 3 deletions libasn1compiler/asn1c_constraint.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ asn1c_emit_constraint_tables(arg_t *arg, int got_size) {

untl = (range_stop - range_start) + 1;
untl += (untl % 16)?16 - (untl % 16):0;
OUT("static int permitted_alphabet_table_%d[%d] = {\n",
OUT("static const int permitted_alphabet_table_%d[%d] = {\n",
arg->expr->_type_unique_index, max_table_size);
for(n = 0; n < untl; n++) {
cardinal += table[n] ? 1 : 0;
Expand Down Expand Up @@ -347,7 +347,7 @@ asn1c_emit_constraint_tables(arg_t *arg, int got_size) {
if((arg->flags & A1C_GEN_PER)
&& (etype & ASN_STRING_KM_MASK)) {
int c;
OUT("static int permitted_alphabet_code2value_%d[%d] = {\n",
OUT("static const int permitted_alphabet_code2value_%d[%d] = {\n",
arg->expr->_type_unique_index, cardinal);
for(n = c = 0; c < max_table_size; c++) {
if(table[c]) {
Expand Down Expand Up @@ -396,7 +396,7 @@ asn1c_emit_constraint_tables(arg_t *arg, int got_size) {
OUT("\n");
} else {
if(use_table) {
OUT("int *table = permitted_alphabet_table_%d;\n",
OUT("const int *table = permitted_alphabet_table_%d;\n",
arg->expr->_type_unique_index);
emit_alphabet_check_loop(arg, 0);
} else {
Expand Down
4 changes: 2 additions & 2 deletions skeletons/BIT_STRING.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/*
* BIT STRING basic type description.
*/
static ber_tlv_tag_t asn_DEF_BIT_STRING_tags[] = {
static const ber_tlv_tag_t asn_DEF_BIT_STRING_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (3 << 2))
};
static asn_OCTET_STRING_specifics_t asn_DEF_BIT_STRING_specs = {
Expand Down Expand Up @@ -140,7 +140,7 @@ BIT_STRING_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
int
BIT_STRING_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
asn_app_consume_bytes_f *cb, void *app_key) {
static const char *h2c = "0123456789ABCDEF";
const char * const h2c = "0123456789ABCDEF";
char scratch[64];
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
uint8_t *buf;
Expand Down
2 changes: 1 addition & 1 deletion skeletons/BMPString.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/*
* BMPString basic type description.
*/
static ber_tlv_tag_t asn_DEF_BMPString_tags[] = {
static const ber_tlv_tag_t asn_DEF_BMPString_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (30 << 2)), /* [UNIVERSAL 30] IMPLICIT ...*/
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */
};
Expand Down
2 changes: 1 addition & 1 deletion skeletons/BOOLEAN.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/*
* BOOLEAN basic type description.
*/
static ber_tlv_tag_t asn_DEF_BOOLEAN_tags[] = {
static const ber_tlv_tag_t asn_DEF_BOOLEAN_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (1 << 2))
};
asn_TYPE_descriptor_t asn_DEF_BOOLEAN = {
Expand Down
2 changes: 1 addition & 1 deletion skeletons/ENUMERATED.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/*
* ENUMERATED basic type description.
*/
static ber_tlv_tag_t asn_DEF_ENUMERATED_tags[] = {
static const ber_tlv_tag_t asn_DEF_ENUMERATED_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_ENUMERATED = {
Expand Down
2 changes: 1 addition & 1 deletion skeletons/GeneralString.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/*
* GeneralString basic type description.
*/
static ber_tlv_tag_t asn_DEF_GeneralString_tags[] = {
static const ber_tlv_tag_t asn_DEF_GeneralString_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (27 << 2)), /* [UNIVERSAL 27] IMPLICIT ...*/
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */
};
Expand Down
2 changes: 1 addition & 1 deletion skeletons/GeneralizedTime.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static time_t timegm(struct tm *tm) {
/*
* GeneralizedTime basic type description.
*/
static ber_tlv_tag_t asn_DEF_GeneralizedTime_tags[] = {
static const ber_tlv_tag_t asn_DEF_GeneralizedTime_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (24 << 2)), /* [UNIVERSAL 24] IMPLICIT ...*/
(ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), /* [UNIVERSAL 26] IMPLICIT ...*/
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */
Expand Down
2 changes: 1 addition & 1 deletion skeletons/GraphicString.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/*
* GraphicString basic type description.
*/
static ber_tlv_tag_t asn_DEF_GraphicString_tags[] = {
static const ber_tlv_tag_t asn_DEF_GraphicString_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (25 << 2)), /* [UNIVERSAL 25] IMPLICIT ...*/
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */
};
Expand Down
2 changes: 1 addition & 1 deletion skeletons/IA5String.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/*
* IA5String basic type description.
*/
static ber_tlv_tag_t asn_DEF_IA5String_tags[] = {
static const ber_tlv_tag_t asn_DEF_IA5String_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), /* [UNIVERSAL 22] IMPLICIT ...*/
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */
};
Expand Down
12 changes: 6 additions & 6 deletions skeletons/INTEGER.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/*
* INTEGER basic type description.
*/
static ber_tlv_tag_t asn_DEF_INTEGER_tags[] = {
static const ber_tlv_tag_t asn_DEF_INTEGER_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_INTEGER = {
Expand Down Expand Up @@ -106,7 +106,7 @@ static const asn_INTEGER_enum_map_t *INTEGER_map_enum2value(asn_INTEGER_specific
* INTEGER specific human-readable output.
*/
static ssize_t
INTEGER__dump(asn_TYPE_descriptor_t *td, const INTEGER_t *st, asn_app_consume_bytes_f *cb, void *app_key, int plainOrXER) {
INTEGER__dump(const asn_TYPE_descriptor_t *td, const INTEGER_t *st, asn_app_consume_bytes_f *cb, void *app_key, int plainOrXER) {
asn_INTEGER_specifics_t *specs=(asn_INTEGER_specifics_t *)td->specifics;
char scratch[32]; /* Enough for 64-bit integer */
uint8_t *buf = st->buf;
Expand Down Expand Up @@ -166,7 +166,7 @@ INTEGER__dump(asn_TYPE_descriptor_t *td, const INTEGER_t *st, asn_app_consume_by
/* Output in the long xx:yy:zz... format */
/* TODO: replace with generic algorithm (Knuth TAOCP Vol 2, 4.3.1) */
for(p = scratch; buf < buf_end; buf++) {
static const char *h2c = "0123456789ABCDEF";
const char * const h2c = "0123456789ABCDEF";
if((p - scratch) >= (ssize_t)(sizeof(scratch) - 4)) {
/* Flush buffer */
if(cb(scratch, p - scratch, app_key) < 0)
Expand Down Expand Up @@ -208,8 +208,8 @@ INTEGER_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
struct e2v_key {
const char *start;
const char *stop;
asn_INTEGER_enum_map_t *vemap;
unsigned int *evmap;
const asn_INTEGER_enum_map_t *vemap;
const unsigned int *evmap;
};
static int
INTEGER__compar_enum2value(const void *kp, const void *am) {
Expand All @@ -232,7 +232,7 @@ INTEGER__compar_enum2value(const void *kp, const void *am) {

static const asn_INTEGER_enum_map_t *
INTEGER_map_enum2value(asn_INTEGER_specifics_t *specs, const char *lstart, const char *lstop) {
asn_INTEGER_enum_map_t *el_found;
const asn_INTEGER_enum_map_t *el_found;
int count = specs ? specs->map_count : 0;
struct e2v_key key;
const char *lp;
Expand Down
6 changes: 3 additions & 3 deletions skeletons/INTEGER.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ typedef struct asn_INTEGER_enum_map_s {
} asn_INTEGER_enum_map_t;

/* This type describes an enumeration for INTEGER and ENUMERATED types */
typedef struct asn_INTEGER_specifics_s {
asn_INTEGER_enum_map_t *value2enum; /* N -> "tag"; sorted by N */
unsigned int *enum2value; /* "tag" => N; sorted by tag */
typedef const struct asn_INTEGER_specifics_s {
const asn_INTEGER_enum_map_t *value2enum; /* N -> "tag"; sorted by N */
const unsigned int *enum2value; /* "tag" => N; sorted by tag */
int map_count; /* Elements in either map */
int extension; /* This map is extensible */
int strict_enumeration; /* Enumeration set is fixed */
Expand Down
2 changes: 1 addition & 1 deletion skeletons/ISO646String.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/*
* ISO646String basic type description.
*/
static ber_tlv_tag_t asn_DEF_ISO646String_tags[] = {
static const ber_tlv_tag_t asn_DEF_ISO646String_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), /* [UNIVERSAL 26] IMPLICIT ...*/
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */
};
Expand Down
2 changes: 1 addition & 1 deletion skeletons/NULL.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/*
* NULL basic type description.
*/
static ber_tlv_tag_t asn_DEF_NULL_tags[] = {
static const ber_tlv_tag_t asn_DEF_NULL_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (5 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NULL = {
Expand Down
4 changes: 2 additions & 2 deletions skeletons/NativeEnumerated.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/*
* NativeEnumerated basic type description.
*/
static ber_tlv_tag_t asn_DEF_NativeEnumerated_tags[] = {
static const ber_tlv_tag_t asn_DEF_NativeEnumerated_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NativeEnumerated = {
Expand Down Expand Up @@ -145,7 +145,7 @@ NativeEnumerated_encode_uper(asn_TYPE_descriptor_t *td,
asn_per_constraint_t *ct;
int inext = 0;
asn_INTEGER_enum_map_t key;
asn_INTEGER_enum_map_t *kf;
const asn_INTEGER_enum_map_t *kf;

if(!sptr) _ASN_ENCODE_FAILED;
if(!specs) _ASN_ENCODE_FAILED;
Expand Down
2 changes: 1 addition & 1 deletion skeletons/NativeInteger.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/*
* NativeInteger basic type description.
*/
static ber_tlv_tag_t asn_DEF_NativeInteger_tags[] = {
static const ber_tlv_tag_t asn_DEF_NativeInteger_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NativeInteger = {
Expand Down
2 changes: 1 addition & 1 deletion skeletons/NativeReal.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/*
* NativeReal basic type description.
*/
static ber_tlv_tag_t asn_DEF_NativeReal_tags[] = {
static const ber_tlv_tag_t asn_DEF_NativeReal_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NativeReal = {
Expand Down
2 changes: 1 addition & 1 deletion skeletons/NumericString.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/*
* NumericString basic type description.
*/
static ber_tlv_tag_t asn_DEF_NumericString_tags[] = {
static const ber_tlv_tag_t asn_DEF_NumericString_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (18 << 2)), /* [UNIVERSAL 18] IMPLICIT ...*/
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */
};
Expand Down
12 changes: 6 additions & 6 deletions skeletons/OBJECT_IDENTIFIER.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/*
* OBJECT IDENTIFIER basic type description.
*/
static ber_tlv_tag_t asn_DEF_OBJECT_IDENTIFIER_tags[] = {
static const ber_tlv_tag_t asn_DEF_OBJECT_IDENTIFIER_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (6 << 2))
};
asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER = {
Expand Down Expand Up @@ -65,9 +65,9 @@ OBJECT_IDENTIFIER_constraint(asn_TYPE_descriptor_t *td, const void *sptr,


int
OBJECT_IDENTIFIER_get_single_arc(uint8_t *arcbuf, unsigned int arclen, signed int add, void *rvbufp, unsigned int rvsize) {
OBJECT_IDENTIFIER_get_single_arc(const uint8_t *arcbuf, unsigned int arclen, signed int add, void *rvbufp, unsigned int rvsize) {
unsigned LE GCC_NOTUSED = 1; /* Little endian (x86) */
uint8_t *arcend = arcbuf + arclen; /* End of arc */
const uint8_t *arcend = arcbuf + arclen; /* End of arc */
unsigned int cache = 0; /* No more than 14 significant bits */
unsigned char *rvbuf = (unsigned char *)rvbufp;
unsigned char *rvstart = rvbuf; /* Original start of the value buffer */
Expand Down Expand Up @@ -181,7 +181,7 @@ OBJECT_IDENTIFIER_get_single_arc(uint8_t *arcbuf, unsigned int arclen, signed in
}

ssize_t
OBJECT_IDENTIFIER__dump_arc(uint8_t *arcbuf, int arclen, int add,
OBJECT_IDENTIFIER__dump_arc(const uint8_t *arcbuf, int arclen, int add,
asn_app_consume_bytes_f *cb, void *app_key) {
char scratch[64]; /* Conservative estimate */
unsigned long accum; /* Bits accumulator */
Expand Down Expand Up @@ -212,7 +212,7 @@ OBJECT_IDENTIFIER__dump_arc(uint8_t *arcbuf, int arclen, int add,
}

int
OBJECT_IDENTIFIER_print_arc(uint8_t *arcbuf, int arclen, int add,
OBJECT_IDENTIFIER_print_arc(const uint8_t *arcbuf, int arclen, int add,
asn_app_consume_bytes_f *cb, void *app_key) {

if(OBJECT_IDENTIFIER__dump_arc(arcbuf, arclen, add, cb, app_key) < 0)
Expand Down Expand Up @@ -360,7 +360,7 @@ OBJECT_IDENTIFIER_print(asn_TYPE_descriptor_t *td, const void *sptr,
}

int
OBJECT_IDENTIFIER_get_arcs(OBJECT_IDENTIFIER_t *oid, void *arcs,
OBJECT_IDENTIFIER_get_arcs(const OBJECT_IDENTIFIER_t *oid, void *arcs,
unsigned int arc_type_size, unsigned int arc_slots) {
void *arcs_end = (char *)arcs + (arc_type_size * arc_slots);
int num_arcs = 0;
Expand Down
8 changes: 4 additions & 4 deletions skeletons/OBJECT_IDENTIFIER.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ xer_type_encoder_f OBJECT_IDENTIFIER_encode_xer;
* WARNING: The function always returns the real number of arcs,
* even if there is no sufficient (_arc_slots) provided.
*/
int OBJECT_IDENTIFIER_get_arcs(OBJECT_IDENTIFIER_t *_oid,
int OBJECT_IDENTIFIER_get_arcs(const OBJECT_IDENTIFIER_t *_oid,
void *_arcs, /* e.g., unsigned int arcs[N] */
unsigned int _arc_type_size, /* e.g., sizeof(arcs[0]) */
unsigned int _arc_slots /* e.g., N */);
Expand All @@ -91,12 +91,12 @@ int OBJECT_IDENTIFIER_set_arcs(OBJECT_IDENTIFIER_t *_oid,
/*
* Print the specified OBJECT IDENTIFIER arc.
*/
int OBJECT_IDENTIFIER_print_arc(uint8_t *arcbuf, int arclen,
int OBJECT_IDENTIFIER_print_arc(const uint8_t *arcbuf, int arclen,
int add, /* Arbitrary offset, required to process the first two arcs */
asn_app_consume_bytes_f *cb, void *app_key);

/* Same as above, but returns the number of written digits, instead of 0 */
ssize_t OBJECT_IDENTIFIER__dump_arc(uint8_t *arcbuf, int arclen, int add,
ssize_t OBJECT_IDENTIFIER__dump_arc(const uint8_t *arcbuf, int arclen, int add,
asn_app_consume_bytes_f *cb, void *app_key);

/*
Expand Down Expand Up @@ -127,7 +127,7 @@ int OBJECT_IDENTIFIER_parse_arcs(const char *oid_text, ssize_t oid_txt_length,
* Internal functions.
* Used by RELATIVE-OID implementation in particular.
*/
int OBJECT_IDENTIFIER_get_single_arc(uint8_t *arcbuf, unsigned int arclen,
int OBJECT_IDENTIFIER_get_single_arc(const uint8_t *arcbuf, unsigned int arclen,
signed int add, void *value, unsigned int value_size);
int OBJECT_IDENTIFIER_set_single_arc(uint8_t *arcbuf,
const void *arcval, unsigned int arcval_size, int _prepared_order);
Expand Down
Loading