]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
windows: adjust name of two internal public functions
authorViktor Szakats <commit@vsz.me>
Mon, 26 Sep 2022 22:31:09 +0000 (22:31 +0000)
committerViktor Szakats <commit@vsz.me>
Mon, 26 Sep 2022 22:32:23 +0000 (22:32 +0000)
According to `docs/INTERNALS.md`, internal function names spanning source
files start with uppercase `Curl_`. Bring these two functions in
alignment with this.

This also stops exporting them from `libcurl.dll` in autotools builds.

Reviewed-by: Daniel Stenberg
Closes #9598

lib/idn_win32.c
lib/url.c

index dacba01d7abe01788edc8946db0300f6a435768a..2433d927ee33c4a5cb61b3625812ac25ec0d3d88 100644 (file)
@@ -67,10 +67,10 @@ WINBASEAPI int WINAPI IdnToUnicode(DWORD dwFlags,
 
 #define IDN_MAX_LENGTH 255
 
-bool curl_win32_idn_to_ascii(const char *in, char **out);
-bool curl_win32_ascii_to_idn(const char *in, char **out);
+bool Curl_win32_idn_to_ascii(const char *in, char **out);
+bool Curl_win32_ascii_to_idn(const char *in, char **out);
 
-bool curl_win32_idn_to_ascii(const char *in, char **out)
+bool Curl_win32_idn_to_ascii(const char *in, char **out)
 {
   bool success = FALSE;
 
@@ -93,7 +93,7 @@ bool curl_win32_idn_to_ascii(const char *in, char **out)
   return success;
 }
 
-bool curl_win32_ascii_to_idn(const char *in, char **out)
+bool Curl_win32_ascii_to_idn(const char *in, char **out)
 {
   bool success = FALSE;
 
index df67e87678c804dc5e9e2caa0f59ab939b965ef3..33aa19be95d0ebab013fe0dd3bbdfa00b8fcf8c4 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -73,8 +73,8 @@
 #endif
 
 #elif defined(USE_WIN32_IDN)
-/* prototype for curl_win32_idn_to_ascii() */
-bool curl_win32_idn_to_ascii(const char *in, char **out);
+/* prototype for Curl_win32_idn_to_ascii() */
+bool Curl_win32_idn_to_ascii(const char *in, char **out);
 #endif  /* USE_LIBIDN2 */
 
 #include "doh.h"
@@ -1648,7 +1648,7 @@ CURLcode Curl_idnconvert_hostname(struct Curl_easy *data,
 #elif defined(USE_WIN32_IDN)
     char *ace_hostname = NULL;
 
-    if(curl_win32_idn_to_ascii(host->name, &ace_hostname)) {
+    if(Curl_win32_idn_to_ascii(host->name, &ace_hostname)) {
       host->encalloc = ace_hostname;
       /* change the name pointer to point to the encoded hostname */
       host->name = host->encalloc;
@@ -1679,7 +1679,7 @@ void Curl_free_idnconverted_hostname(struct hostname *host)
   }
 #elif defined(USE_WIN32_IDN)
   free(host->encalloc); /* must be freed with free() since this was
-                           allocated by curl_win32_idn_to_ascii */
+                           allocated by Curl_win32_idn_to_ascii */
   host->encalloc = NULL;
 #else
   (void)host;