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

This commit is contained in:
rdb 2009-11-15 09:54:25 +00:00
parent c7b77fb6f0
commit 7ee08a75a5
3 changed files with 16 additions and 16 deletions

View File

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

View File

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

View File

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