зеркало из https://github.com/mozilla/gecko-dev.git
Bug 714029 - Avoid jsctypes-test dependency on the xpcom glue. r=bsmedberg
This commit is contained in:
Родитель
84247499ed
Коммит
abd5771495
|
@ -56,12 +56,6 @@ LOCAL_INCLUDES = \
|
||||||
-I$(topsrcdir)/js/src/ctypes \
|
-I$(topsrcdir)/js/src/ctypes \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
EXTRA_DSO_LDOPTS += \
|
|
||||||
$(XPCOM_STANDALONE_GLUE_LDOPTS) \
|
|
||||||
$(MOZALLOC_LIB) \
|
|
||||||
$(NSPR_LIBS) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
XPCSHELL_TESTS = unit
|
XPCSHELL_TESTS = unit
|
||||||
|
|
||||||
_CHROME_TEST_FILES = \
|
_CHROME_TEST_FILES = \
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
|
|
||||||
#include "jsctypes-test.h"
|
#include "jsctypes-test.h"
|
||||||
#include "nsCRTGlue.h"
|
#include "nsCRTGlue.h"
|
||||||
#include <string.h>
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
@ -161,16 +160,24 @@ get_##name##_stats(size_t* align, size_t* size, size_t* nalign, size_t* nsize, \
|
||||||
}
|
}
|
||||||
#include "typedefs.h"
|
#include "typedefs.h"
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
PRInt32 StrLen(const T* string)
|
||||||
|
{
|
||||||
|
const T *end;
|
||||||
|
for (end = string; *end; ++end);
|
||||||
|
return end - string;
|
||||||
|
}
|
||||||
|
|
||||||
PRInt32
|
PRInt32
|
||||||
test_ansi_len(const char* string)
|
test_ansi_len(const char* string)
|
||||||
{
|
{
|
||||||
return PRInt32(strlen(string));
|
return StrLen(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
PRInt32
|
PRInt32
|
||||||
test_wide_len(const PRUnichar* string)
|
test_wide_len(const PRUnichar* string)
|
||||||
{
|
{
|
||||||
return PRInt32(NS_strlen(string));
|
return StrLen(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
|
|
Загрузка…
Ссылка в новой задаче