From 4f3e1a60f1dc7a84cece8f9c7933794e83d0bae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Fri, 9 Sep 2022 22:54:40 +0300 Subject: [PATCH] mdbx: remove `MDBX_INTERNAL_FUNC` from `mdbx_w2mb()` and `mdbx_mb2w()` for C++ API. --- src/osal.c | 6 ++---- src/osal.h | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/osal.c b/src/osal.c index f0bbbc32..f5838653 100644 --- a/src/osal.c +++ b/src/osal.c @@ -527,14 +527,12 @@ static const DWORD WC_ERR_INVALID_CHARS = : 0; #endif /* WC_ERR_INVALID_CHARS */ -MDBX_INTERNAL_FUNC size_t mdbx_mb2w(wchar_t *dst, size_t dst_n, const char *src, - size_t src_n) { +size_t mdbx_mb2w(wchar_t *dst, size_t dst_n, const char *src, size_t src_n) { return MultiByteToWideChar(CP_THREAD_ACP, MB_ERR_INVALID_CHARS, src, (int)src_n, dst, (int)dst_n); } -MDBX_INTERNAL_FUNC size_t mdbx_w2mb(char *dst, size_t dst_n, const wchar_t *src, - size_t src_n) { +size_t mdbx_w2mb(char *dst, size_t dst_n, const wchar_t *src, size_t src_n) { return WideCharToMultiByte(CP_THREAD_ACP, WC_ERR_INVALID_CHARS, src, (int)src_n, dst, (int)dst_n, nullptr, nullptr); } diff --git a/src/osal.h b/src/osal.h index 3ac5ce44..5f9e8075 100644 --- a/src/osal.h +++ b/src/osal.h @@ -180,10 +180,8 @@ static inline void mdbx_free(void *ptr) { HeapFree(GetProcessHeap(), 0, ptr); } #define vsnprintf _vsnprintf /* ntdll */ #endif -MDBX_INTERNAL_FUNC size_t mdbx_mb2w(wchar_t *dst, size_t dst_n, const char *src, - size_t src_n); -MDBX_INTERNAL_FUNC size_t mdbx_w2mb(char *dst, size_t dst_n, const wchar_t *src, - size_t src_n); +size_t mdbx_mb2w(wchar_t *dst, size_t dst_n, const char *src, size_t src_n); +size_t mdbx_w2mb(char *dst, size_t dst_n, const wchar_t *src, size_t src_n); #else /*----------------------------------------------------------------------*/