Bug 714029 - Avoid jsctypes-test dependency on the xpcom glue. r=bsmedberg

This commit is contained in:
Mike Hommey 2012-01-10 09:10:53 +01:00
parent 1f8a59e8a7
commit 646b1c1fa5
2 changed files with 10 additions and 9 deletions

View File

@ -56,12 +56,6 @@ LOCAL_INCLUDES = \
-I$(topsrcdir)/js/src/ctypes \
$(NULL)
EXTRA_DSO_LDOPTS += \
$(XPCOM_STANDALONE_GLUE_LDOPTS) \
$(MOZALLOC_LIB) \
$(NSPR_LIBS) \
$(NULL)
XPCSHELL_TESTS = unit
_CHROME_TEST_FILES = \

View File

@ -40,7 +40,6 @@
#include "jsctypes-test.h"
#include "nsCRTGlue.h"
#include <string.h>
#include <math.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"
template <typename T>
PRInt32 StrLen(const T* string)
{
const T *end;
for (end = string; *end; ++end);
return end - string;
}
PRInt32
test_ansi_len(const char* string)
{
return PRInt32(strlen(string));
return StrLen(string);
}
PRInt32
test_wide_len(const PRUnichar* string)
{
return PRInt32(NS_strlen(string));
return StrLen(string);
}
const char *