瀏覽代碼

Add extern C

Stefan Profanter 7 年之前
父節點
當前提交
fa5796157e
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/ua_types_encoding_binary.h

+ 8 - 0
src/ua_types_encoding_binary.h

@@ -5,6 +5,10 @@
 #ifndef UA_TYPES_ENCODING_BINARY_H_
 #define UA_TYPES_ENCODING_BINARY_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include "ua_types.h"
 
 typedef UA_StatusCode (*UA_exchangeEncodeBuffer)(void *handle, UA_Byte **bufPos, const UA_Byte **bufEnd);
@@ -21,4 +25,8 @@ UA_decodeBinary(const UA_ByteString *src, size_t *offset, void *dst,
 
 size_t UA_calcSizeBinary(void *p, const UA_DataType *type);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* UA_TYPES_ENCODING_BINARY_H_ */