mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
commit 06a5dd6038d06df968bc1610dccf04c4ad16fe44
Author: Jacek Caban <jacek@codeweavers.com> Date: Sat Mar 13 13:23:21 2010 +0100 Bug 513788 - mingw fix
This commit is contained in:
parent
99981a8bf9
commit
92a0404005
@ -974,8 +974,8 @@ IntegerToString(IntegerType i, jsuint radix)
|
||||
{
|
||||
// The buffer must be big enough for all the bits of IntegerType to fit,
|
||||
// in base-2, including '-'.
|
||||
jschar buffer[sizeof(IntegerType) * 8 + 1];
|
||||
jschar *cp = buffer + sizeof(buffer) / sizeof(jschar);
|
||||
PRUnichar buffer[sizeof(IntegerType) * 8 + 1];
|
||||
PRUnichar* cp = buffer + sizeof(buffer) / sizeof(PRUnichar);
|
||||
|
||||
// Build the string in reverse. We use multiplication and subtraction
|
||||
// instead of modulus because that's much faster.
|
||||
@ -992,7 +992,7 @@ IntegerToString(IntegerType i, jsuint radix)
|
||||
*--cp = '-';
|
||||
|
||||
JS_ASSERT(cp >= buffer);
|
||||
return nsAutoString(cp, buffer + sizeof(buffer) / sizeof(jschar) - cp);
|
||||
return nsAutoString(cp, buffer + sizeof(buffer) / sizeof(PRUnichar) - cp);
|
||||
}
|
||||
|
||||
template<class IntegerType>
|
||||
@ -3185,7 +3185,8 @@ AddFieldToArray(JSContext* cx,
|
||||
NULL, NULL, JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT))
|
||||
return false;
|
||||
|
||||
if (!JS_DefineUCProperty(cx, fieldObj, name.get(), name.Length(),
|
||||
if (!JS_DefineUCProperty(cx, fieldObj,
|
||||
reinterpret_cast<const jschar*>(name.get()), name.Length(),
|
||||
OBJECT_TO_JSVAL(typeObj), NULL, NULL,
|
||||
JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT))
|
||||
return false;
|
||||
@ -3278,7 +3279,7 @@ StructType::Create(JSContext* cx, uintN argc, jsval* vp)
|
||||
|
||||
// Fill in the PropertySpec for the field.
|
||||
PropertySpec* instanceProp = instanceProps.AppendElement();
|
||||
instanceProp->name = info->mName.get();
|
||||
instanceProp->name = reinterpret_cast<const jschar*>(info->mName.get());
|
||||
instanceProp->namelen = info->mName.Length();
|
||||
instanceProp->flags = JSPROP_SHARED | JSPROP_ENUMERATE | JSPROP_PERMANENT;
|
||||
instanceProp->getter = StructType::FieldGetter;
|
||||
|
Loading…
Reference in New Issue
Block a user