For compatibility with old C compilers, don't use const in C code.
diff --git a/ndn-cpp/encoding/BinaryXMLDecoder.h b/ndn-cpp/encoding/BinaryXMLDecoder.h
index 50374cf..c9e558d 100644
--- a/ndn-cpp/encoding/BinaryXMLDecoder.h
+++ b/ndn-cpp/encoding/BinaryXMLDecoder.h
@@ -12,12 +12,12 @@
#endif
struct ndn_BinaryXMLDecoder {
- const unsigned char *input;
+ unsigned char *input;
unsigned int inputLength;
unsigned int offset;
};
-static inline void ndn_BinaryXMLDecoder_init(struct ndn_BinaryXMLDecoder *self, const unsigned char *input, unsigned int inputLength)
+static inline void ndn_BinaryXMLDecoder_init(struct ndn_BinaryXMLDecoder *self, unsigned char *input, unsigned int inputLength)
{
self->input = input;
self->inputLength = inputLength;
@@ -25,7 +25,7 @@
}
// Even though the first byte should not be zero, this silently ignores initial zeros.
-const char *ndn_BinaryXMLDecoder_decodeTypeAndValue(struct ndn_BinaryXMLDecoder *self, unsigned int *type, unsigned int *value);
+char *ndn_BinaryXMLDecoder_decodeTypeAndValue(struct ndn_BinaryXMLDecoder *self, unsigned int *type, unsigned int *value);
/**
* Set the offset into the input, used for the next read.