Remove the inline marker from extract_{number,length}
Clang insists in inlining extract_number even with -Os, which increases
the code size considerably. Without the markers, now both Clang and GCC
inline extract_length but not extract_number.
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
diff --git a/src/cborparser.c b/src/cborparser.c
index 801cae0..d21ff23 100644
--- a/src/cborparser.c
+++ b/src/cborparser.c
@@ -79,7 +79,7 @@
return cbor_ntohll(result);
}
-static inline CborError extract_number(const CborParser *parser, const uint8_t **ptr, uint64_t *len)
+static CborError extract_number(const CborParser *parser, const uint8_t **ptr, uint64_t *len)
{
uint8_t additional_information = **ptr & SmallValueMask;
++*ptr;
@@ -106,7 +106,7 @@
return CborNoError;
}
-static inline CborError extract_length(const CborParser *parser, const uint8_t **ptr, size_t *len)
+static CborError extract_length(const CborParser *parser, const uint8_t **ptr, size_t *len)
{
uint64_t v;
CborError err = extract_number(parser, ptr, &v);