fsl_state Struct Reference

Generic state-with-finalizer holder. More...

#include "fossil-util.h"

Data Fields

fsl_finalizer finalize
 Finalizer for this->state. More...
void * state
 Arbitrary context-dependent state. More...

Detailed Description

Generic state-with-finalizer holder.

Used for binding client-specified state to another other object, such that a client-specified finalizer is called with the other object is cleaned up.

Definition at line 232 of file fossil-util.h.

Field Documentation

fsl_finalizer fsl_state::finalize

Finalizer for this->state.

If used, it should be called like:

this->finalize.f( this->finalize.state, this->state );

After which this->state must be treated as if it has been free(3)'d.

Definition at line 247 of file fossil-util.h.

void* fsl_state::state

Arbitrary context-dependent state.

Definition at line 236 of file fossil-util.h.

The documentation for this struct was generated from the following file: