- Timestamp:
- 01/01/11 14:36:38 (1 year ago)
- Files:
-
- branches/CDGC/import/object.di (modified) (1 diff)
- branches/CDGC/src/core/runtime.d (modified) (3 diffs)
- branches/CDGC/src/object_.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/CDGC/import/object.di
r466 r468 299 299 { 300 300 int opApply(scope int delegate(ref char[])); 301 int opApply(scope int delegate(ref size_t, ref char[])); 301 302 string toString(); 302 303 } branches/CDGC/src/core/runtime.d
r467 r468 400 400 free( framelist ); 401 401 } 402 403 override int opApply( scope int delegate(ref char[]) dg ) 404 { 405 return opApply( (ref size_t, ref char[] buf) 406 { 407 return dg( buf ); 408 } ); 409 } 402 410 403 override int opApply( scope int delegate(ref char[]) dg )411 override int opApply( scope int delegate(ref size_t, ref char[]) dg ) 404 412 { 405 413 version( Posix ) … … 425 433 { 426 434 auto buf = framelist[i][0 .. strlen(framelist[i])]; 435 auto pos = cast(size_t)(i - FIRSTFRAME); 427 436 buf = fixline( buf ); 428 ret = dg( buf );437 ret = dg( pos, buf ); 429 438 if( ret ) 430 439 break; 431 440 } 432 return ret; 441 return ret; 433 442 } 434 443 … … 436 445 { 437 446 string buf; 438 foreach( line; this )439 buf ~= line;447 foreach( i, line; this ) 448 buf ~= i ? "\n" ~ line : line; 440 449 return buf; 441 450 } branches/CDGC/src/object_.d
r467 r468 1223 1223 { 1224 1224 int opApply(scope int delegate(ref char[])); 1225 int opApply(scope int delegate(ref size_t, ref char[])); 1225 1226 string toString(); 1226 1227 }
