ua_util.c 839 B

123456789101112131415161718192021
  1. #include "ua_util.h"
  2. /* the extern inline in a *.c-file is required for other compilation units to
  3. see the inline function. */
  4. extern INLINE UA_Int32 _UA_free(void *ptr, char *pname, char *f, UA_Int32 l);
  5. extern INLINE UA_Int32 _UA_alloc(void **ptr, UA_Int32 size, char *pname, char *sname, char *f, UA_Int32 l);
  6. extern INLINE UA_Int32 _UA_alloca(void **ptr, UA_Int32 size, char *pname, char *sname, char *f, UA_Int32 l);
  7. UA_Int32 UA_memcpy(void *dst, void const *src, UA_Int32 size) {
  8. if(dst == UA_NULL) return UA_ERR_INVALID_VALUE;
  9. DBG_VERBOSE(printf("UA_memcpy - %p;%p;%d\n", dst, src, size));
  10. memcpy(dst, src, size);
  11. return UA_SUCCESS;
  12. }
  13. UA_Int32 UA_VTable_isValidType(UA_Int32 type) {
  14. if(type < 0 /* UA_BOOLEAN */ || type > 271 /* UA_INVALID */)
  15. return UA_ERR_INVALID_VALUE;
  16. return UA_SUCCESS;
  17. }