Previous: , Up: Block Methods   [Contents][Index]


7.1.3 blonde_post_sector

extern int blonde_post_sector
    (void *, void **, unsigned, off_t *);

the block id and

The function allocates a block of at least $3 bytes in the $1 data store (database, that is) and stores the file offset of the block at $4. If *$2 is 0 a new block is created and its id stored at $2. Otherwise, the *$2 block is reallocated. The change is not recorded until the current transaction is closed. The block id is of an integer type matching the pointer size.

For this library version, the file path is the database path suffixed by the particle ".end".

The function returns 0, and one of the defined error codes for failure.