Changeset 314 for trunk/thune/make.c
- Timestamp:
- 12/03/06 07:37:24 (2 years ago)
- Files:
-
- 1 modified
-
trunk/thune/make.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/thune/make.c
r312 r314 660 660 661 661 662 UIndex ur_makeVector( int size, UArray** ptr ) 663 { 664 UIndex binN; 665 UArray* bin; 666 667 binN = ur_makeBinary( size * sizeof(int32_t) ); 668 bin = ur_binPtr( binN ); 669 bin->avail /= sizeof(int32_t); 670 671 if( ptr ) 672 *ptr = bin; 673 674 return binN; 675 } 676 677 662 678 // Returns zero if make failed. 663 UIndex ur_makeVector( const UCell* from, UCell* res ) 664 { 679 UIndex ur_makeVectorCell( const UCell* from, UCell* res ) 680 { 681 UArray* bin; 665 682 UIndex binN = 0; 666 683 int vtype = UT_INT; … … 668 685 if( ur_is(from, UT_BLOCK) ) 669 686 { 670 UBinary* bin;671 687 UBlock* blk; 672 688 UCell* it; … … 676 692 UR_ITER_BLOCK( it, end, blk, from ) 677 693 678 binN = ur_makeBinary( (end - it) * sizeof(int32_t) ); 679 bin = ur_binPtr( binN ); 694 binN = ur_makeVector( end - it, &bin ); 680 695 681 696 while( it != end ) … … 716 731 else if( ur_is(from, UT_INT) ) 717 732 { 718 binN = ur_make Binary( ur_int(from) * sizeof(int32_t));733 binN = ur_makeVector( ur_int(from), 0 ); 719 734 } 720 735 … … 723 738 init: 724 739 ur_initType(res, UT_VECTOR); 725 ur_ arrayDT(res) = vtype;740 ur_vectorDT(res) = vtype; 726 741 ur_setSeries(res, binN, 0); 727 742 return binN; … … 1530 1545 { 1531 1546 // Make array before setting res in case GC is called. 1532 UIndex binN = ur_makeVector ( tos, res );1547 UIndex binN = ur_makeVectorCell( tos, res ); 1533 1548 if( ! binN ) 1534 1549 goto error;
