Changeset 509 for trunk/thune/unix/os.c

Show
Ignore:
Timestamp:
02/09/08 02:35:22 (10 months ago)
Author:
krobillard
Message:

Added hold/release macros. ur_readDir() now holds its result block.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/unix/os.c

    r458 r509  
    247247        UCell* cell; 
    248248        UIndex blkN; 
    249         UBlock* blk; 
     249        UIndex hold; 
    250250 
    251251        blkN = ur_makeBlock( 0 ); 
    252         blk = ur_blockPtr( blkN ); 
     252        hold = ur_holdBlock( blkN ); 
    253253 
    254254        while( (entry = readdir( dir )) ) 
     
    259259 
    260260            // Mark cell as unset in case GC is called by ur_makeString. 
    261             cell = ur_appendCell( blk, UT_UNSET ); 
     261            cell = ur_appendCell( ur_blockPtr( blkN ), UT_UNSET ); 
    262262            ur_makeString( cell, cp, -1 ); 
    263263        } 
    264264 
    265265        closedir( dir ); 
     266 
     267        ur_release( hold ); 
    266268 
    267269        ur_initType(res, UT_BLOCK);