Show
Ignore:
Timestamp:
04/30/07 03:51:13 (21 months ago)
Author:
matthiasm
Message:

Fixed precedent entries to be created much earlier and correctly avoid recursion.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • NEWT0/trunk/src/newt_core/NewtPkg.c

    r98 r100  
    293293 *  
    294294 * @param pkg       [inout] the package 
    295  * @param offset    [in] whgere to write the info ref 
     295 * @param offset    [in] where to write the info ref 
    296296 * @param frame     [in] frame containing the data  
    297297 * @param sym       [in] symbol of slot containing the data 
     
    350350    // calculate the size of this chunk 
    351351    dst = PkgAlign(pkg, pkg->size); 
     352    PkgPartSetPrecedent(pkg, frame, dst); 
    352353    n = NewtFrameLength(frame); 
    353354    size = (n+3)*4; 
     
    389390    // calculate the size of this chunk 
    390391    dst = PkgAlign(pkg, pkg->size); 
     392    PkgPartSetPrecedent(pkg, array, dst); 
    391393    n = NewtArrayLength(array); 
    392394    size = (n+3)*4; 
     
    428430    // calculate the size of this chunk 
    429431    dst = PkgAlign(pkg, pkg->size); 
     432    PkgPartSetPrecedent(pkg, obj, dst); 
    430433    size = NewtBinaryLength(obj); 
    431434    data = NewtRefToBinary(obj); 
     
    520523        return kNewtRefNIL; // do not create a precedent 
    521524    } 
    522  
    523     // make this ref available for later incarnations of the same object 
    524     PkgPartSetPrecedent(pkg, obj, dst); 
    525525 
    526526    return dst;