From c8c8655ff69e9ee49a2dbf1d761d5afb740ffacf Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 18 Aug 2021 09:17:58 +0000 Subject: [PATCH] defined hio_ipad_bytes_to_oocstr/hio_oochars_to_ipad_bytes/hio_oocstr_to_ipad_bytes --- hio/lib/hio-skad.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hio/lib/hio-skad.h b/hio/lib/hio-skad.h index f8c412e..1b4dc40 100644 --- a/hio/lib/hio-skad.h +++ b/hio/lib/hio-skad.h @@ -277,6 +277,20 @@ HIO_EXPORT int hio_bchars_to_ipad_bytes ( hio_oow_t blen ); + +#define hio_ucstr_to_ipad_bytes(str,buf,blen) hio_uchars_to_ipad_bytes(str, hio_count_ucstr(str,buf,len) +#define hio_bcstr_to_ipad_bytes(str,buf,blen) hio_bchars_to_ipad_bytes(str, hio_count_bcstr(str,buf,len) + +#if defined(HIO_OOCH_IS_UCH) +# define hio_ipad_bytes_to_oocstr hio_ipad_bytes_to_ucstr +# define hio_oochars_to_ipad_bytes hio_uchars_to_ipad_bytes +# define hio_oocstr_to_ipad_bytes hio_ucstr_to_ipad_bytes +#else +# define hio_ipad_bytes_to_oocstr hio_ipad_bytes_to_bcstr +# define hio_oochars_to_ipad_bytes hio_bchars_to_ipad_bytes +# define hio_oocstr_to_ipad_bytes hio_bcstr_to_ipad_bytes +#endif + HIO_EXPORT int hio_ipad_bytes_is_v4_mapped ( const hio_uint8_t* iptr, hio_oow_t ilen