зеркало из https://github.com/mozilla/gecko-dev.git
get xptinfo building on Win32 again
This commit is contained in:
Родитель
c6c0714f4f
Коммит
41b9e6001a
|
@ -22,6 +22,7 @@
|
|||
#define xpt_cpp_h___
|
||||
|
||||
#include "xpt_struct.h"
|
||||
#include "xptinfo.h"
|
||||
|
||||
// Everything here is dependent upon - and sensitive to changes in -
|
||||
// xpcom/libxpt/xpt_struct.h!
|
||||
|
@ -115,10 +116,10 @@ public:
|
|||
// is associated with so that we can find the table this index indexes
|
||||
// and then find the referenced XPTInterfaceDirectoryEntry so that we can
|
||||
// find (or build) the appropriate nsIInterfaceInfo. Simple :)
|
||||
nsIInterfaceInfo* GetInterface(nsIInterfaceInfo *info) const ;
|
||||
XPTI_EXPORT nsIInterfaceInfo* GetInterface(nsIInterfaceInfo *info) const ;
|
||||
|
||||
// a *little* simpler than the above
|
||||
const nsIID* GetInterfaceIID(nsIInterfaceInfo *info) const ;
|
||||
XPTI_EXPORT const nsIID* GetInterfaceIID(nsIInterfaceInfo *info) const ;
|
||||
|
||||
private:
|
||||
nsXPTParamInfo(); // no implementation
|
||||
|
|
|
@ -32,13 +32,20 @@
|
|||
#ifdef EXPORT_XPTI_API
|
||||
#define XPTI_PUBLIC_API(t) PR_IMPLEMENT(t)
|
||||
#define XPTI_PUBLIC_DATA(t) PR_IMPLEMENT_DATA(t)
|
||||
#ifdef _WIN32
|
||||
# define XPTI_EXPORT _declspec(dllexport)
|
||||
#else
|
||||
# define XPTI_EXPORT
|
||||
#endif
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
# define XPTI_PUBLIC_API(t) _declspec(dllimport) t
|
||||
# define XPTI_PUBLIC_DATA(t) _declspec(dllimport) t
|
||||
# define XPTI_EXPORT _declspec(dllimport)
|
||||
#else
|
||||
# define XPTI_PUBLIC_API(t) PR_IMPLEMENT(t)
|
||||
# define XPTI_PUBLIC_DATA(t) t
|
||||
# define XPTI_EXPORT
|
||||
#endif
|
||||
#endif
|
||||
#define XPTI_FRIEND_API(t) XPTI_PUBLIC_API(t)
|
||||
|
|
|
@ -102,7 +102,7 @@ int main (int argc, char **argv) {
|
|||
|
||||
nsXPTParamInfo param2 = mi->GetParam(2);
|
||||
// should be IID for nsIShutdownListener
|
||||
nsIID *nsISL = param2.GetInterfaceIID(info5);
|
||||
const nsIID *nsISL = param2.GetInterfaceIID(info5);
|
||||
fprintf(stderr, "iid assoc'd with param 2 of method 7 of GetServiceWithListener - %s\n", nsISL->ToString());
|
||||
// if we look up the name?
|
||||
char *nsISLname;
|
||||
|
@ -112,7 +112,7 @@ int main (int argc, char **argv) {
|
|||
fprintf(stderr, "\nhow about one defined in a different typelib\n");
|
||||
nsXPTParamInfo param3 = mi->GetParam(3);
|
||||
// should be IID for nsIShutdownListener
|
||||
nsIID *nsISS = param3.GetInterfaceIID(info5);
|
||||
const nsIID *nsISS = param3.GetInterfaceIID(info5);
|
||||
fprintf(stderr, "iid assoc'd with param 3 of method 7 of GetServiceWithListener - %s\n", nsISS->ToString());
|
||||
// if we look up the name?
|
||||
char *nsISSname;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#define xpt_cpp_h___
|
||||
|
||||
#include "xpt_struct.h"
|
||||
#include "xptinfo.h"
|
||||
|
||||
// Everything here is dependent upon - and sensitive to changes in -
|
||||
// xpcom/libxpt/xpt_struct.h!
|
||||
|
@ -115,10 +116,10 @@ public:
|
|||
// is associated with so that we can find the table this index indexes
|
||||
// and then find the referenced XPTInterfaceDirectoryEntry so that we can
|
||||
// find (or build) the appropriate nsIInterfaceInfo. Simple :)
|
||||
nsIInterfaceInfo* GetInterface(nsIInterfaceInfo *info) const ;
|
||||
XPTI_EXPORT nsIInterfaceInfo* GetInterface(nsIInterfaceInfo *info) const ;
|
||||
|
||||
// a *little* simpler than the above
|
||||
const nsIID* GetInterfaceIID(nsIInterfaceInfo *info) const ;
|
||||
XPTI_EXPORT const nsIID* GetInterfaceIID(nsIInterfaceInfo *info) const ;
|
||||
|
||||
private:
|
||||
nsXPTParamInfo(); // no implementation
|
||||
|
|
|
@ -32,13 +32,20 @@
|
|||
#ifdef EXPORT_XPTI_API
|
||||
#define XPTI_PUBLIC_API(t) PR_IMPLEMENT(t)
|
||||
#define XPTI_PUBLIC_DATA(t) PR_IMPLEMENT_DATA(t)
|
||||
#ifdef _WIN32
|
||||
# define XPTI_EXPORT _declspec(dllexport)
|
||||
#else
|
||||
# define XPTI_EXPORT
|
||||
#endif
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
# define XPTI_PUBLIC_API(t) _declspec(dllimport) t
|
||||
# define XPTI_PUBLIC_DATA(t) _declspec(dllimport) t
|
||||
# define XPTI_EXPORT _declspec(dllimport)
|
||||
#else
|
||||
# define XPTI_PUBLIC_API(t) PR_IMPLEMENT(t)
|
||||
# define XPTI_PUBLIC_DATA(t) t
|
||||
# define XPTI_EXPORT
|
||||
#endif
|
||||
#endif
|
||||
#define XPTI_FRIEND_API(t) XPTI_PUBLIC_API(t)
|
||||
|
|
|
@ -102,7 +102,7 @@ int main (int argc, char **argv) {
|
|||
|
||||
nsXPTParamInfo param2 = mi->GetParam(2);
|
||||
// should be IID for nsIShutdownListener
|
||||
nsIID *nsISL = param2.GetInterfaceIID(info5);
|
||||
const nsIID *nsISL = param2.GetInterfaceIID(info5);
|
||||
fprintf(stderr, "iid assoc'd with param 2 of method 7 of GetServiceWithListener - %s\n", nsISL->ToString());
|
||||
// if we look up the name?
|
||||
char *nsISLname;
|
||||
|
@ -112,7 +112,7 @@ int main (int argc, char **argv) {
|
|||
fprintf(stderr, "\nhow about one defined in a different typelib\n");
|
||||
nsXPTParamInfo param3 = mi->GetParam(3);
|
||||
// should be IID for nsIShutdownListener
|
||||
nsIID *nsISS = param3.GetInterfaceIID(info5);
|
||||
const nsIID *nsISS = param3.GetInterfaceIID(info5);
|
||||
fprintf(stderr, "iid assoc'd with param 3 of method 7 of GetServiceWithListener - %s\n", nsISS->ToString());
|
||||
// if we look up the name?
|
||||
char *nsISSname;
|
||||
|
|
Загрузка…
Ссылка в новой задаче