Bug 888280 - Give several things in CTypes.cpp internal name linkage. r=evilpies

This commit is contained in:
Dan Gohman 2013-07-03 15:23:05 -07:00
Родитель 0049df5d64
Коммит ae00e3dd0e
2 изменённых файлов: 10 добавлений и 25 удалений

Просмотреть файл

@ -787,14 +787,14 @@ GetABICode(JSObject* obj)
return ABICode(JSVAL_TO_INT(result));
}
JSErrorFormatString ErrorFormatString[CTYPESERR_LIMIT] = {
static JSErrorFormatString ErrorFormatString[CTYPESERR_LIMIT] = {
#define MSG_DEF(name, number, count, exception, format) \
{ format, count, exception } ,
#include "ctypes/ctypes.msg"
#undef MSG_DEF
};
const JSErrorFormatString*
static const JSErrorFormatString*
GetErrorMessage(void* userRef, const char* locale, const unsigned errorNumber)
{
if (0 < errorNumber && errorNumber < CTYPESERR_LIMIT)
@ -802,7 +802,7 @@ GetErrorMessage(void* userRef, const char* locale, const unsigned errorNumber)
return NULL;
}
JSBool
static JSBool
TypeError(JSContext* cx, const char* expected, jsval actual)
{
JSString* str = JS_ValueToSource(cx, actual);
@ -1009,7 +1009,7 @@ InitTypeConstructor(JSContext* cx,
return true;
}
JSObject*
static JSObject*
InitInt64Class(JSContext* cx,
HandleObject parent,
JSClass* clasp,
@ -1057,7 +1057,7 @@ AttachProtos(JSObject* proto, const AutoObjectVector& protos)
JS_SetReservedSlot(proto, i, OBJECT_TO_JSVAL(protos[i]));
}
JSBool
static JSBool
InitTypeClasses(JSContext* cx, HandleObject parent)
{
// Initialize the ctypes.CType class. This acts as an abstract base class for
@ -1253,7 +1253,7 @@ GetCallbacks(JSObject* obj)
// Utility function to access a property of an object as an object
// returns false and sets the error if the property does not exist
// or is not an object
bool GetObjectProperty(JSContext *cx, HandleObject obj,
static bool GetObjectProperty(JSContext *cx, HandleObject obj,
const char *property, MutableHandleObject result)
{
RootedValue val(cx);
@ -2032,7 +2032,7 @@ strnlen(const CharType* begin, size_t max)
// parent's buffer.
// * If 'parentObj' is null, the new CData object may or may not own its
// resulting buffer depending on the 'ownResult' argument.
JSBool
static JSBool
ConvertToJS(JSContext* cx,
HandleObject typeObj,
HandleObject parentObj,
@ -2187,7 +2187,7 @@ bool CanConvertTypedArrayItemTo(JSObject *baseType, JSObject *valObj, JSContext
// we can autoconvert a JS string primitive to a pointer-to-character type.
// In this case, ownership of the allocated string is handed off to the
// caller; 'freePointer' will be set to indicate this.
JSBool
static JSBool
ImplicitConvert(JSContext* cx,
HandleValue val,
JSObject* targetType_,
@ -2578,7 +2578,7 @@ ImplicitConvert(JSContext* cx,
// Convert jsval 'val' to a C binary representation of CType 'targetType',
// storing the result in 'buffer'. This function is more forceful than
// ImplicitConvert.
JSBool
static JSBool
ExplicitConvert(JSContext* cx, HandleValue val, HandleObject targetType, void* buffer)
{
// If ImplicitConvert succeeds, use that result.

Просмотреть файл

@ -183,10 +183,6 @@ enum ErrorNum {
CTYPESERR_LIMIT
};
const JSErrorFormatString*
GetErrorMessage(void* userRef, const char* locale, const unsigned errorNumber);
JSBool TypeError(JSContext* cx, const char* expected, jsval actual);
/**
* ABI constants that specify the calling convention to use.
* ctypes.default_abi corresponds to the cdecl convention, and in almost all
@ -311,17 +307,6 @@ bool IsCTypesGlobal(JSObject* obj);
JSCTypesCallbacks* GetCallbacks(JSObject* obj);
JSBool InitTypeClasses(JSContext* cx, HandleObject parent);
JSBool ConvertToJS(JSContext* cx, HandleObject typeObj, HandleObject dataObj,
void* data, bool wantPrimitive, bool ownResult, jsval* result);
JSBool ImplicitConvert(JSContext* cx, HandleValue val, JSObject* targetType,
void* buffer, bool isArgument, bool* freePointer);
JSBool ExplicitConvert(JSContext* cx, HandleValue val, HandleObject targetType,
void* buffer);
/*******************************************************************************
** JSClass reserved slot definitions
*******************************************************************************/