ports/www/mod_pagespeed/files/patch-url_url__canon__icu.cc
Mahdi Mokhtari 60a05e200a www/mod_pagespeed: Add latest stable version to the tree
mod_pagespeed is an open-source Apache module that automatically
optimizes web pages and resources on them by rewriting the
resources using filters that implement web performance best practices.

Reviewed by:	mat (mentor)
Approved by:	mat (mentor)
Sponsored by:	Netzkommune GmbH
Differential Revision:	https://reviews.freebsd.org/D12616
2017-10-13 15:15:53 +00:00

20 lines
1.1 KiB
C++

--- url/url_canon_icu.cc.orig 2017-10-07 18:17:57 UTC
+++ url/url_canon_icu.cc
@@ -130,7 +130,7 @@ void ICUCharsetConverter::ConvertFromUTF
UErrorCode err = U_ZERO_ERROR;
char* dest = &output->data()[begin_offset];
int required_capacity = ucnv_fromUChars(converter_, dest, dest_capacity,
- input, input_len, &err);
+ reinterpret_cast<const UChar*>(input), input_len, &err);
if (err != U_BUFFER_OVERFLOW_ERROR) {
output->set_length(begin_offset + required_capacity);
return;
@@ -169,7 +169,7 @@ bool IDNToASCII(const base::char16* src,
while (true) {
UErrorCode err = U_ZERO_ERROR;
UIDNAInfo info = UIDNA_INFO_INITIALIZER;
- int output_length = uidna_nameToASCII(uidna, src, src_len, output->data(),
+ int output_length = uidna_nameToASCII(uidna, reinterpret_cast<const UChar*>(src), src_len, reinterpret_cast<UChar*>(output->data()),
output->capacity(), &info, &err);
if (U_SUCCESS(err) && info.errors == 0) {
output->set_length(output_length);