зеркало из https://github.com/mozilla/pjs.git
Move xptinfo, xptcall from export phase (erroneously copied from libxpt Makefile.in) to libs and back out previous tree patch.
This commit is contained in:
Родитель
68d22e0429
Коммит
c17ac10f7c
|
@ -29,7 +29,7 @@ endif
|
|||
|
||||
DIRS += fdlibm
|
||||
|
||||
# DIRS += xpconnect
|
||||
DIRS += xpconnect
|
||||
|
||||
LIBRARY_NAME = $(MOZ_LIB_JS_PREFIX)js
|
||||
|
||||
|
|
|
@ -49,7 +49,5 @@ CPPSRCS= \
|
|||
xpcwrappednativeclass.cpp \
|
||||
$(NULL)
|
||||
|
||||
export:: libs
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ srcdir = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = public src idl
|
||||
DIRS = public src idl libxpt
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
|
|
|
@ -30,6 +30,11 @@ CSRCS = xpt_struct.c \
|
|||
|
||||
REQUIRES = $(MODULE)
|
||||
|
||||
# build libxpt (but not xptinfo, xptcall subdirs) early so that it'll be
|
||||
# available to xpidl, which also must be built early.
|
||||
export:: libs
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
Move xptinfo, xptcall from export phase (erroneously copied from libxpt Makefile.in) to libs and back out previous temporary fix.
|
||||
|
||||
|
|
|
@ -33,6 +33,6 @@ CSRCS = xptcall.c \
|
|||
|
||||
REQUIRES = $(MODULE)
|
||||
|
||||
export:: libs
|
||||
# export:: libs
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -34,6 +34,6 @@ CPPSRCS = nsInterfaceInfo.cpp \
|
|||
|
||||
REQUIRES = $(MODULE)
|
||||
|
||||
export:: libs
|
||||
# export:: libs
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
/* Implementation of nsIInterfaceInfoManager. */
|
||||
|
||||
#include "nscore.h"
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIInterfaceInfo.h"
|
||||
#include "nsIInterfaceInfoManager.h"
|
||||
|
@ -119,9 +121,9 @@ nsInterfaceInfo::GetMethodInfo(uint16 index, const nsXPTMethodInfo** info)
|
|||
}
|
||||
|
||||
// else...
|
||||
*info = (nsXPTMethodInfo*)
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
method_descriptors[index - mMethodBaseIndex];
|
||||
*info = NS_REINTERPRET_CAST(nsXPTMethodInfo*,
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
method_descriptors[index - mMethodBaseIndex]);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -131,19 +133,20 @@ nsInterfaceInfo::GetMethodInfoForName(const char* methodName, uint16 *index,
|
|||
{
|
||||
// XXX probably want to speed this up with a hashtable, or by at least interning
|
||||
// the names to avoid the strcmp
|
||||
nsresult rv;
|
||||
for (uint16 i = mMethodBaseIndex; i < mMethodCount; i++) {
|
||||
const nsXPTMethodInfo* info;
|
||||
info = (nsXPTMethodInfo*)
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
method_descriptors[i - mMethodBaseIndex];
|
||||
info = NS_REINTERPRET_CAST(nsXPTMethodInfo*,
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
method_descriptors[i - mMethodBaseIndex]);
|
||||
if (PL_strcmp(methodName, info->name) == 0) {
|
||||
#ifdef NS_DEBUG
|
||||
// make sure there aren't duplicate names
|
||||
for (; i < mMethodCount; i++) {
|
||||
const nsXPTMethodInfo* info2;
|
||||
info2 = (nsXPTMethodInfo*)
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
method_descriptors[i - mMethodBaseIndex];
|
||||
info2 = NS_REINTERPRET_CAST(nsXPTMethodInfo*,
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
method_descriptors[i - mMethodBaseIndex]);
|
||||
NS_ASSERTION(PL_strcmp(methodName, info2->name)!= 0, "duplicate names");
|
||||
}
|
||||
#endif
|
||||
|
@ -168,9 +171,10 @@ nsInterfaceInfo::GetConstant(uint16 index, const nsXPTConstant** constant)
|
|||
}
|
||||
|
||||
// else...
|
||||
*constant = (nsXPTConstant*)
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
const_descriptors[index-mConstantBaseIndex];
|
||||
*constant =
|
||||
NS_REINTERPRET_CAST(nsXPTConstant*,
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
const_descriptors[index-mConstantBaseIndex]);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
/* Implementation of nsIInterfaceInfo. */
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include "nscore.h"
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIInterfaceInfoManager.h"
|
||||
|
|
|
@ -33,6 +33,6 @@ CSRCS = xptcall.c \
|
|||
|
||||
REQUIRES = $(MODULE)
|
||||
|
||||
export:: libs
|
||||
# export:: libs
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -34,6 +34,6 @@ CPPSRCS = nsInterfaceInfo.cpp \
|
|||
|
||||
REQUIRES = $(MODULE)
|
||||
|
||||
export:: libs
|
||||
# export:: libs
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
/* Implementation of nsIInterfaceInfoManager. */
|
||||
|
||||
#include "nscore.h"
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIInterfaceInfo.h"
|
||||
#include "nsIInterfaceInfoManager.h"
|
||||
|
@ -119,9 +121,9 @@ nsInterfaceInfo::GetMethodInfo(uint16 index, const nsXPTMethodInfo** info)
|
|||
}
|
||||
|
||||
// else...
|
||||
*info = (nsXPTMethodInfo*)
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
method_descriptors[index - mMethodBaseIndex];
|
||||
*info = NS_REINTERPRET_CAST(nsXPTMethodInfo*,
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
method_descriptors[index - mMethodBaseIndex]);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -131,19 +133,20 @@ nsInterfaceInfo::GetMethodInfoForName(const char* methodName, uint16 *index,
|
|||
{
|
||||
// XXX probably want to speed this up with a hashtable, or by at least interning
|
||||
// the names to avoid the strcmp
|
||||
nsresult rv;
|
||||
for (uint16 i = mMethodBaseIndex; i < mMethodCount; i++) {
|
||||
const nsXPTMethodInfo* info;
|
||||
info = (nsXPTMethodInfo*)
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
method_descriptors[i - mMethodBaseIndex];
|
||||
info = NS_REINTERPRET_CAST(nsXPTMethodInfo*,
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
method_descriptors[i - mMethodBaseIndex]);
|
||||
if (PL_strcmp(methodName, info->name) == 0) {
|
||||
#ifdef NS_DEBUG
|
||||
// make sure there aren't duplicate names
|
||||
for (; i < mMethodCount; i++) {
|
||||
const nsXPTMethodInfo* info2;
|
||||
info2 = (nsXPTMethodInfo*)
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
method_descriptors[i - mMethodBaseIndex];
|
||||
info2 = NS_REINTERPRET_CAST(nsXPTMethodInfo*,
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
method_descriptors[i - mMethodBaseIndex]);
|
||||
NS_ASSERTION(PL_strcmp(methodName, info2->name)!= 0, "duplicate names");
|
||||
}
|
||||
#endif
|
||||
|
@ -168,9 +171,10 @@ nsInterfaceInfo::GetConstant(uint16 index, const nsXPTConstant** constant)
|
|||
}
|
||||
|
||||
// else...
|
||||
*constant = (nsXPTConstant*)
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
const_descriptors[index-mConstantBaseIndex];
|
||||
*constant =
|
||||
NS_REINTERPRET_CAST(nsXPTConstant*,
|
||||
&mInterfaceRecord->interfaceDescriptor->
|
||||
const_descriptors[index-mConstantBaseIndex]);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
/* Implementation of nsIInterfaceInfo. */
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include "nscore.h"
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIInterfaceInfoManager.h"
|
||||
|
|
|
@ -30,6 +30,11 @@ CSRCS = xpt_struct.c \
|
|||
|
||||
REQUIRES = $(MODULE)
|
||||
|
||||
# build libxpt (but not xptinfo, xptcall subdirs) early so that it'll be
|
||||
# available to xpidl, which also must be built early.
|
||||
export:: libs
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
Move xptinfo, xptcall from export phase (erroneously copied from libxpt Makefile.in) to libs and back out previous temporary fix.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче