Commit 9fa62a2c authored by Nicolas Chauvet's avatar Nicolas Chauvet Committed by Rémi Denis-Courmont

Untracked API change utf8 to UTF8

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 68472916
...@@ -967,7 +967,7 @@ LibvlcPlaylistNPObject::invoke(int index, const NPVariant *args, ...@@ -967,7 +967,7 @@ LibvlcPlaylistNPObject::invoke(int index, const NPVariant *args,
void LibvlcPlaylistNPObject::parseOptions(const NPString &nps, void LibvlcPlaylistNPObject::parseOptions(const NPString &nps,
int *i_options, char*** ppsz_options) int *i_options, char*** ppsz_options)
{ {
if( nps.utf8length ) if( nps.UTF8Length )
{ {
char *s = stringValue(nps); char *s = stringValue(nps);
char *val = s; char *val = s;
...@@ -979,7 +979,7 @@ void LibvlcPlaylistNPObject::parseOptions(const NPString &nps, ...@@ -979,7 +979,7 @@ void LibvlcPlaylistNPObject::parseOptions(const NPString &nps,
{ {
int nOptions = 0; int nOptions = 0;
char *end = val + nps.utf8length; char *end = val + nps.UTF8Length;
while( val < end ) while( val < end )
{ {
// skip leading blanks // skip leading blanks
......
...@@ -37,11 +37,11 @@ ...@@ -37,11 +37,11 @@
char* RuntimeNPObject::stringValue(const NPString &s) char* RuntimeNPObject::stringValue(const NPString &s)
{ {
NPUTF8 *val = static_cast<NPUTF8*>(malloc((s.utf8length+1) * sizeof(*val))); NPUTF8 *val = static_cast<NPUTF8*>(malloc((s.UTF8Length+1) * sizeof(*val)));
if( val ) if( val )
{ {
strncpy(val, s.utf8characters, s.utf8length); strncpy(val, s.UTF8Characters, s.UTF8Length);
val[s.utf8length] = '\0'; val[s.UTF8Length] = '\0';
} }
return val; return val;
} }
......
...@@ -449,8 +449,8 @@ NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[]) ...@@ -449,8 +449,8 @@ NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[])
NPString script; NPString script;
NPVariant result; NPVariant result;
script.utf8characters = docLocHref; script.UTF8Characters = docLocHref;
script.utf8length = sizeof(docLocHref)-1; script.UTF8Length = sizeof(docLocHref)-1;
if( NPN_Evaluate(p_browser, plugin, &script, &result) ) if( NPN_Evaluate(p_browser, plugin, &script, &result) )
{ {
...@@ -458,11 +458,11 @@ NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[]) ...@@ -458,11 +458,11 @@ NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[])
{ {
NPString &location = NPVARIANT_TO_STRING(result); NPString &location = NPVARIANT_TO_STRING(result);
psz_baseURL = (char *) malloc(location.utf8length+1); psz_baseURL = (char *) malloc(location.UTF8Length+1);
if( psz_baseURL ) if( psz_baseURL )
{ {
strncpy(psz_baseURL, location.utf8characters, location.utf8length); strncpy(psz_baseURL, location.UTF8Characters, location.UTF8Length);
psz_baseURL[location.utf8length] = '\0'; psz_baseURL[location.UTF8Length] = '\0';
} }
} }
NPN_ReleaseVariantValue(&result); NPN_ReleaseVariantValue(&result);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment