]> git.sesse.net Git - vlc/blobdiff - projects/mozilla/control/nporuntime.cpp
mozilla: rework events
[vlc] / projects / mozilla / control / nporuntime.cpp
index b237fbd18497b61856a3e7b384608bfae5ce6629..f60e1ae07ccaa99397aa3371350d7ec9b96a05ac 100644 (file)
 #include <string.h>
 #include <stdlib.h>
 
-/* Mozilla stuff */
-#ifdef HAVE_MOZILLA_CONFIG_H
-#   include <mozilla-config.h>
-#endif
-
 #include "nporuntime.h"
 #include "vlcplugin.h"
 
 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 )
     {
-        strncpy(val, s.utf8characters, s.utf8length);
-        val[s.utf8length] = '\0';
+        strncpy(val, s.UTF8Characters, s.UTF8Length);
+        val[s.UTF8Length] = '\0';
     }
     return val;
 }
@@ -130,4 +125,3 @@ RuntimeNPObject::invokeResultString(const char *psz, NPVariant &result)
     }
     return INVOKERESULT_NO_ERROR;
 }
-