Changeset 68 for trunk/orca/ovalue.c
- Timestamp:
- 03/02/06 23:56:07 (3 years ago)
- Files:
-
- 1 modified
-
trunk/orca/ovalue.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/orca/ovalue.c
r54 r68 278 278 279 279 280 /** 281 Initialize scripting environment. 282 Call orFreeEnv() when finished with the interpreter. 283 284 If dataStackSize is less than 512 it will be set to 512. 285 If callStackSize is less than 64 it will be set to 64. 286 */ 287 void orInitEnv( OEnv* env, int dataStackSize, int callStackSize ) 288 { 280 #ifdef DEBUG 281 static void _validateEnv() 282 { 283 int i; 284 OValue val; 285 289 286 #if 0 290 287 printf( "sizeof(OValue) %d\n", sizeof(OValue) ); … … 297 294 298 295 assert( sizeof(OValue) == 16 ); 296 297 // Make sure endianess is correct. 298 i = 1; 299 #if defined(__BIG_ENDIAN__) 300 assert(0 == *(char*)&i && "Undefine __BIG_ENDIAN__"); 301 #else 302 assert(1 == *(char*)&i && "Define __BIG_ENDIAN__"); 303 #endif 304 305 // Make sure double is aligned on 8 byte boundary. 306 assert( ((char*) &val) + 8 == ((char*) &orDecimal(&val)) ); 307 } 308 #endif 309 310 311 /** 312 Initialize scripting environment. 313 Call orFreeEnv() when finished with the interpreter. 314 315 If dataStackSize is less than 512 it will be set to 512. 316 If callStackSize is less than 64 it will be set to 64. 317 */ 318 void orInitEnv( OEnv* env, int dataStackSize, int callStackSize ) 319 { 320 #ifdef DEBUG 321 _validateEnv(); 322 #endif 299 323 300 324 orEnv = env; … … 394 418 wval = orIntern( &ctx, "native", 6, 0 ); 395 419 *wval = *res; 396 397 // Makes sure double is aligned on 8 byte boundary.398 assert( ((char*) res) + 8 == ((char*) &orDecimal(res)) );399 420 400 421 orNative( orNativeNative, "native" );
