Changeset 509 for trunk/thune/win32/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/win32/os.c

    r477 r509  
    314314        UCell* cell; 
    315315        UIndex blkN; 
    316         UBlock* blk; 
     316        UIndex hold; 
    317317            
    318318        blkN = ur_makeBlock( 0 ); 
    319         blk  = ur_blockPtr( blkN ); 
     319        hold = ur_holdBlock( blkN ); 
    320320 
    321321        do 
     
    326326 
    327327            // Mark cell as unset in case GC is called by ur_makeString. 
    328             cell = ur_appendCell( blk, UT_UNSET ); 
     328            cell = ur_appendCell( ur_blockPtr( blkN ), UT_UNSET ); 
    329329            ur_makeString( cell, fileinfo.name, -1 ); 
    330330        } 
     
    332332 
    333333        _findclose( handle ); 
     334 
     335        ur_release( hold ); 
    334336 
    335337        ur_initType(res, UT_BLOCK);