diff options
Diffstat (limited to 'Build/source/libs/icu/icu-src/source/common/cmemory.h')
-rw-r--r-- | Build/source/libs/icu/icu-src/source/common/cmemory.h | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/Build/source/libs/icu/icu-src/source/common/cmemory.h b/Build/source/libs/icu/icu-src/source/common/cmemory.h index ddf8e49a681..5cb52993abc 100644 --- a/Build/source/libs/icu/icu-src/source/common/cmemory.h +++ b/Build/source/libs/icu/icu-src/source/common/cmemory.h @@ -36,31 +36,10 @@ #include <stdio.h> #endif -#if U_DEBUG - -/* - * The C++ standard requires that the source pointer for memcpy() & memmove() - * is valid, not NULL, and not at the end of an allocated memory block. - * In debug mode, we read one byte from the source point to verify that it's - * a valid, readable pointer. - */ - -U_CAPI void uprv_checkValidMemory(const void *p, size_t n); - -#define uprv_memcpy(dst, src, size) ( \ - uprv_checkValidMemory(src, 1), \ - U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size)) -#define uprv_memmove(dst, src, size) ( \ - uprv_checkValidMemory(src, 1), \ - U_STANDARD_CPP_NAMESPACE memmove(dst, src, size)) - -#else #define uprv_memcpy(dst, src, size) U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size) #define uprv_memmove(dst, src, size) U_STANDARD_CPP_NAMESPACE memmove(dst, src, size) -#endif /* U_DEBUG */ - /** * \def UPRV_LENGTHOF * Convenience macro to determine the length of a fixed array at compile-time. |