Procházet zdrojové kódy

make calcsizebinary const

Julius Pfrommer před 6 roky
rodič
revize
083356b4af

+ 1 - 1
src/ua_types_encoding_binary.c

@@ -1732,7 +1732,7 @@ const calcSizeBinarySignature calcSizeBinaryJumpTable[UA_BUILTIN_TYPES_COUNT + 1
 };
 
 size_t
-UA_calcSizeBinary(void *p, const UA_DataType *type) {
+UA_calcSizeBinary(const void *p, const UA_DataType *type) {
     size_t s = 0;
     uintptr_t ptr = (uintptr_t)p;
     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
  * it does not access global (thread-local) variables. */
 size_t
-UA_calcSizeBinary(void *p, const UA_DataType *type);
+UA_calcSizeBinary(const void *p, const UA_DataType *type);
 
 const UA_DataType *
 UA_findDataTypeByBinary(const UA_NodeId *typeId);