Browse Source

move some macro definitions out of ua_util.h

Julius Pfrommer 6 years ago
parent
commit
34b028d52a
3 changed files with 12 additions and 8 deletions
  1. 8 0
      include/ua_config.h.in
  2. 4 0
      plugins/ua_nodestore_default.c
  3. 0 8
      src/ua_util.h

+ 8 - 0
include/ua_config.h.in

@@ -77,6 +77,14 @@ extern "C" {
 #endif
 #endif
 
+/**
+ * Standard Macros
+ * --------------- */
+
+/* Assert */
+#include <assert.h>
+#define UA_assert(ignore) assert(ignore)
+
 /**
  * Memory Management
  * ---------------

+ 4 - 0
plugins/ua_nodestore_default.c

@@ -3,6 +3,10 @@
 
 #include "ua_nodestore_default.h"
 
+/* container_of */
+#define container_of(ptr, type, member) \
+    (type *)((uintptr_t)ptr - offsetof(type,member))
+
 #ifdef UA_ENABLE_MULTITHREADING
 #include <pthread.h>
 #define BEGIN_CRITSECT(NODEMAP) pthread_mutex_lock(&(NODEMAP)->mutex)

+ 0 - 8
src/ua_util.h

@@ -11,20 +11,12 @@
 extern "C" {
 #endif
 
-/* Assert */
-#include <assert.h>
-#define UA_assert(ignore) assert(ignore)
-
 /* BSD Queue Macros */
 #include "queue.h"
 
 /* Macro-Expand for MSVC workarounds */
 #define UA_MACRO_EXPAND(x) x
 
-/* container_of */
-#define container_of(ptr, type, member) \
-    (type *)((uintptr_t)ptr - offsetof(type,member))
-
 #ifdef UA_ENABLE_MULTITHREADING
 /* Thread Local Storage */
 # if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L