Browse Source

make calcsizebinary const

Julius Pfrommer 6 years ago
parent
commit
083356b4af
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/ua_types_encoding_binary.c
  2. 1 1
      src/ua_types_encoding_binary.h

+ 1 - 1
src/ua_types_encoding_binary.c

@@ -1732,7 +1732,7 @@ const calcSizeBinarySignature calcSizeBinaryJumpTable[UA_BUILTIN_TYPES_COUNT + 1
 };
 };
 
 
 size_t
 size_t
-UA_calcSizeBinary(void *p, const UA_DataType *type) {
+UA_calcSizeBinary(const void *p, const UA_DataType *type) {
     size_t s = 0;
     size_t s = 0;
     uintptr_t ptr = (uintptr_t)p;
     uintptr_t ptr = (uintptr_t)p;
     u8 membersSize = type->membersSize;
     u8 membersSize = type->membersSize;

+ 1 - 1
src/ua_types_encoding_binary.h

@@ -71,7 +71,7 @@ UA_decodeBinary(const UA_ByteString *src, size_t *offset, void *dst,
  * zero if an error occurs. UA_calcSizeBinary is thread-safe and reentrant since
  * zero if an error occurs. UA_calcSizeBinary is thread-safe and reentrant since
  * it does not access global (thread-local) variables. */
  * it does not access global (thread-local) variables. */
 size_t
 size_t
-UA_calcSizeBinary(void *p, const UA_DataType *type);
+UA_calcSizeBinary(const void *p, const UA_DataType *type);
 
 
 const UA_DataType *
 const UA_DataType *
 UA_findDataTypeByBinary(const UA_NodeId *typeId);
 UA_findDataTypeByBinary(const UA_NodeId *typeId);