From: ahmedsamyh Date: Fri, 11 Apr 2025 14:44:29 +0000 (+0500) Subject: [commonlib.h] Remove sv_to_ptr() X-Git-Url: https://www.git.momoyon.org/?a=commitdiff_plain;h=c51dc78452129e374cbc5f26ead9e1a24e38157a;p=commonlib.git [commonlib.h] Remove sv_to_ptr() --- diff --git a/commonlib.h b/commonlib.h index 326fd56..4cb2049 100644 --- a/commonlib.h +++ b/commonlib.h @@ -69,7 +69,6 @@ #define sv_to_int c_sv_to_int #define sv_to_uint c_sv_to_uint #define sv_to_uint8_hex c_sv_to_uint8_hex -#define sv_to_ptr c_sv_to_ptr #define sv_to_float c_sv_to_float #define sv_contains_char c_sv_contains_char #define sv_is_hex_numbers c_sv_is_hex_numbers @@ -284,7 +283,6 @@ void c_sv_trim(c_String_view* sv); char* c_sv_to_cstr(c_String_view sv); int64 c_sv_to_int(c_String_view sv, int *count, int base); uint64 c_sv_to_uint(c_String_view sv, int *count, int base); -void* c_sv_to_ptr(c_String_view sv, int *count, int base); float64 c_sv_to_float(c_String_view sv, int *count); bool c_sv_contains_char(c_String_view sv, char ch); bool c_sv_is_hex_numbers(c_String_view sv); @@ -667,14 +665,6 @@ float64 c_sv_to_float(c_String_view sv, int *count) { return res; } -void* c_sv_to_ptr(c_String_view sv, int *count, int base) { - char* str = c_sv_to_cstr(sv); - char* end = NULL; - void* res = (void*)strtoull(str, &end, 16); - C_FREE(str); - return res; -} - bool c_sv_contains_char(c_String_view sv, char ch){ for (size_t i = 0; i < sv.count; ++i){ if (sv.data[i] == ch) return true;