mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-22 19:28:21 +00:00
self-test and x64 fixes:
- headerless: distinguish between allocation granularity and min size (hopefully fixes test failure on x64) - test_wdbg_sym: disable printf spew - hpet: use workaround when x64 MOVD isn't available due to processor or compiler - JSConversions: VC2005 x64 apparently distinguishes ssize_t from long int (as it does with size_t) This was SVN commit r7179.
This commit is contained in:
@@ -212,6 +212,28 @@ template<> bool ToPrimitive<size_t>( JSContext* cx, jsval v, size_t& Storage )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
template<> jsval ToJSVal<ssize_t>( const ssize_t& Native )
|
||||
{
|
||||
return( INT_TO_JSVAL( (int)Native ) );
|
||||
}
|
||||
|
||||
template<> jsval ToJSVal<ssize_t>( ssize_t& Native )
|
||||
{
|
||||
return( INT_TO_JSVAL( (int)Native ) );
|
||||
}
|
||||
|
||||
template<> bool ToPrimitive<ssize_t>( JSContext* cx, jsval v, ssize_t& Storage )
|
||||
{
|
||||
int temp;
|
||||
if(!ToPrimitive<int>(cx, v, temp))
|
||||
return false;
|
||||
if(temp < 0)
|
||||
return false;
|
||||
Storage = (ssize_t)temp;
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // #if ARCH_AMD64
|
||||
#endif // #if !GCC_VERSION
|
||||
|
||||
|
||||
Reference in New Issue
Block a user