@@ -158,10 +158,10 @@ static int apply_userpass_credentials(HINTERNET request, DWORD target, int mecha
158158 goto done ;
159159 }
160160
161- if ((error = user_len = git__utf8_to_16_alloc (& user , c -> username )) < 0 )
161+ if ((error = user_len = git_utf8_to_16_alloc (& user , c -> username )) < 0 )
162162 goto done ;
163163
164- if ((error = pass_len = git__utf8_to_16_alloc (& pass , c -> password )) < 0 )
164+ if ((error = pass_len = git_utf8_to_16_alloc (& pass , c -> password )) < 0 )
165165 goto done ;
166166
167167 if (!WinHttpSetCredentials (request , target , native_scheme , user , pass , NULL )) {
@@ -242,7 +242,7 @@ static int acquire_fallback_cred(
242242 HRESULT hCoInitResult ;
243243
244244 /* Convert URL to wide characters */
245- if (git__utf8_to_16_alloc (& wide_url , url ) < 0 ) {
245+ if (git_utf8_to_16_alloc (& wide_url , url ) < 0 ) {
246246 git_error_set (GIT_ERROR_OS , "failed to convert string to wide form" );
247247 return -1 ;
248248 }
@@ -397,7 +397,7 @@ static int winhttp_stream_connect(winhttp_stream *s)
397397 return -1 ;
398398
399399 /* Convert URL to wide characters */
400- if (git__utf8_to_16_alloc (& s -> request_uri , git_str_cstr (& buf )) < 0 ) {
400+ if (git_utf8_to_16_alloc (& s -> request_uri , git_str_cstr (& buf )) < 0 ) {
401401 git_error_set (GIT_ERROR_OS , "failed to convert string to wide form" );
402402 goto on_error ;
403403 }
@@ -473,7 +473,7 @@ static int winhttp_stream_connect(winhttp_stream *s)
473473 }
474474
475475 /* Convert URL to wide characters */
476- error = git__utf8_to_16_alloc (& proxy_wide , processed_url .ptr );
476+ error = git_utf8_to_16_alloc (& proxy_wide , processed_url .ptr );
477477 git_str_dispose (& processed_url );
478478 if (error < 0 )
479479 goto on_error ;
@@ -531,7 +531,7 @@ static int winhttp_stream_connect(winhttp_stream *s)
531531 s -> service ) < 0 )
532532 goto on_error ;
533533
534- if (git__utf8_to_16 (ct , MAX_CONTENT_TYPE_LEN , git_str_cstr (& buf )) < 0 ) {
534+ if (git_utf8_to_16 (ct , MAX_CONTENT_TYPE_LEN , git_str_cstr (& buf )) < 0 ) {
535535 git_error_set (GIT_ERROR_OS , "failed to convert content-type to wide characters" );
536536 goto on_error ;
537537 }
@@ -548,7 +548,7 @@ static int winhttp_stream_connect(winhttp_stream *s)
548548 s -> service ) < 0 )
549549 goto on_error ;
550550
551- if (git__utf8_to_16 (ct , MAX_CONTENT_TYPE_LEN , git_str_cstr (& buf )) < 0 ) {
551+ if (git_utf8_to_16 (ct , MAX_CONTENT_TYPE_LEN , git_str_cstr (& buf )) < 0 ) {
552552 git_error_set (GIT_ERROR_OS , "failed to convert accept header to wide characters" );
553553 goto on_error ;
554554 }
@@ -568,7 +568,7 @@ static int winhttp_stream_connect(winhttp_stream *s)
568568 git_str_puts (& buf , t -> owner -> connect_opts .custom_headers .strings [i ]);
569569
570570 /* Convert header to wide characters */
571- if ((error = git__utf8_to_16_alloc (& custom_header_wide , git_str_cstr (& buf ))) < 0 )
571+ if ((error = git_utf8_to_16_alloc (& custom_header_wide , git_str_cstr (& buf ))) < 0 )
572572 goto on_error ;
573573
574574 if (!WinHttpAddRequestHeaders (s -> request , custom_header_wide , (ULONG )- 1L ,
@@ -783,7 +783,7 @@ static int winhttp_connect(
783783 }
784784
785785 /* Prepare host */
786- if (git__utf8_to_16_alloc (& wide_host , host ) < 0 ) {
786+ if (git_utf8_to_16_alloc (& wide_host , host ) < 0 ) {
787787 git_error_set (GIT_ERROR_OS , "unable to convert host to wide characters" );
788788 goto on_error ;
789789 }
@@ -792,7 +792,7 @@ static int winhttp_connect(
792792 if (git_http__user_agent (& ua ) < 0 )
793793 goto on_error ;
794794
795- if (git__utf8_to_16_alloc (& wide_ua , git_str_cstr (& ua )) < 0 ) {
795+ if (git_utf8_to_16_alloc (& wide_ua , git_str_cstr (& ua )) < 0 ) {
796796 git_error_set (GIT_ERROR_OS , "unable to convert host to wide characters" );
797797 goto on_error ;
798798 }
@@ -1182,7 +1182,7 @@ static int winhttp_stream_read(
11821182 }
11831183
11841184 /* Convert the Location header to UTF-8 */
1185- if (git__utf16_to_8_alloc (& location8 , location ) < 0 ) {
1185+ if (git_utf8_from_16_alloc (& location8 , location ) < 0 ) {
11861186 git_error_set (GIT_ERROR_OS , "failed to convert Location header to UTF-8" );
11871187 git__free (location );
11881188 return -1 ;
@@ -1254,7 +1254,7 @@ static int winhttp_stream_read(
12541254 else
12551255 p_snprintf (expected_content_type_8 , MAX_CONTENT_TYPE_LEN , "application/x-git-%s-advertisement" , s -> service );
12561256
1257- if (git__utf8_to_16 (expected_content_type , MAX_CONTENT_TYPE_LEN , expected_content_type_8 ) < 0 ) {
1257+ if (git_utf8_to_16 (expected_content_type , MAX_CONTENT_TYPE_LEN , expected_content_type_8 ) < 0 ) {
12581258 git_error_set (GIT_ERROR_OS , "failed to convert expected content-type to wide characters" );
12591259 return -1 ;
12601260 }
0 commit comments