Преглед изворни кода

int## -> int##_t to fix compile errors with Xulrunner SDK 1.9.1

rdb пре 16 година
родитељ
комит
7ee08a75a5

+ 4 - 4
direct/src/plugin_npapi/ppInstance.cxx

@@ -46,8 +46,8 @@ PPInstance::FileDatas PPInstance::_file_datas;
 //               document.
 ////////////////////////////////////////////////////////////////////
 PPInstance::
-PPInstance(NPMIMEType pluginType, NPP instance, uint16 mode, 
-           int16 argc, char *argn[], char *argv[], NPSavedData *saved) {
+PPInstance(NPMIMEType pluginType, NPP instance, uint16_t mode, 
+           int16_t argc, char *argn[], char *argv[], NPSavedData *saved) {
   _p3d_inst = NULL;
 
   _npp_instance = instance;
@@ -198,7 +198,7 @@ set_window(NPWindow *window) {
 //               url request.
 ////////////////////////////////////////////////////////////////////
 NPError PPInstance::
-new_stream(NPMIMEType type, NPStream *stream, bool seekable, uint16 *stype) {
+new_stream(NPMIMEType type, NPStream *stream, bool seekable, uint16_t *stype) {
   assert(find(_streams.begin(), _streams.end(), stream) == _streams.end());
 
   if (stream->notifyData == NULL) {
@@ -280,7 +280,7 @@ stop_outstanding_streams() {
 //  Description: Called by the browser to ask how much data is ready
 //               to be received for the indicated stream.
 ////////////////////////////////////////////////////////////////////
-int32 PPInstance::
+int32_t PPInstance::
 write_ready(NPStream *stream) {
   if (stream->notifyData != NULL) {
     PPDownloadRequest *req = (PPDownloadRequest *)(stream->notifyData);

+ 4 - 4
direct/src/plugin_npapi/ppInstance.h

@@ -34,8 +34,8 @@ class PPDownloadRequest;
 ////////////////////////////////////////////////////////////////////
 class PPInstance {
 public:
-  PPInstance(NPMIMEType pluginType, NPP instance, uint16 mode, 
-             int16 argc, char *argn[], char *argv[], NPSavedData *saved);
+  PPInstance(NPMIMEType pluginType, NPP instance, uint16_t mode, 
+             int16_t argc, char *argn[], char *argv[], NPSavedData *saved);
   ~PPInstance();
 
   void begin();
@@ -45,10 +45,10 @@ public:
   inline const NPWindow *get_window() const;
   void set_window(NPWindow *window);
   NPError new_stream(NPMIMEType type, NPStream *stream, 
-                     bool seekable, uint16 *stype);
+                     bool seekable, uint16_t *stype);
   void stop_outstanding_streams();
 
-  int32 write_ready(NPStream *stream);
+  int32_t write_ready(NPStream *stream);
   int write_stream(NPStream *stream, int offset, int len, void *buffer);
   NPError destroy_stream(NPStream *stream, NPReason reason);
   void url_notify(const char *url, NPReason reason, void *notifyData);

+ 8 - 8
direct/src/plugin_npapi/startup.cxx

@@ -269,8 +269,8 @@ NP_Shutdown(void) {
 //               plugin.
 ////////////////////////////////////////////////////////////////////
 NPError 
-NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, 
-        int16 argc, char *argn[], char *argv[], NPSavedData *saved) {
+NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, 
+        int16_t argc, char *argn[], char *argv[], NPSavedData *saved) {
   nout << "new instance " << instance << "\n";
 
   /*
@@ -363,7 +363,7 @@ NPP_SetWindow(NPP instance, NPWindow *window) {
 ////////////////////////////////////////////////////////////////////
 NPError
 NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, 
-              NPBool seekable, uint16 *stype) {
+              NPBool seekable, uint16_t *stype) {
   nout << "NewStream " << type << ", " << stream->url 
        << ", " << stream->end 
        << ", notifyData = " << stream->notifyData
@@ -401,7 +401,7 @@ NPP_DestroyStream(NPP instance, NPStream *stream, NPReason reason) {
 //  Description: Called by the browser to ask how many bytes it can
 //               deliver for a stream.
 ////////////////////////////////////////////////////////////////////
-int32
+int32_t
 NPP_WriteReady(NPP instance, NPStream *stream) {
   //  nout << "WriteReady " << stream->url << " for " << instance << ", " << (PPInstance *)(instance->pdata) << "\n";
   PPInstance::generic_browser_call();
@@ -417,9 +417,9 @@ NPP_WriteReady(NPP instance, NPStream *stream) {
 //               stream; the plugin should return the number of bytes
 //               consumed.
 ////////////////////////////////////////////////////////////////////
-int32
-NPP_Write(NPP instance, NPStream *stream, int32 offset, 
-          int32 len, void *buffer) {
+int32_t
+NPP_Write(NPP instance, NPStream *stream, int32_t offset, 
+          int32_t len, void *buffer) {
   //  nout << "Write " << stream->url << ", " << len << " for " << instance << ", " << (PPInstance *)(instance->pdata) << "\n";
   PPInstance::generic_browser_call();
   PPInstance *inst = (PPInstance *)(instance->pdata);
@@ -464,7 +464,7 @@ NPP_Print(NPP instance, NPPrint *platformPrint) {
 //  Description: Called by the browser to inform the plugin of OS
 //               window events.
 ////////////////////////////////////////////////////////////////////
-int16
+int16_t
 NPP_HandleEvent(NPP instance, void *event) {
   //  nout << "HandleEvent\n";
   PPInstance::generic_browser_call();