libfossil
fsl_state Struct Reference

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

#include "util.h"

Collaboration diagram for fsl_state:

Data Fields

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

Detailed Description

Generic state-with-finalizer holder.

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

Definition at line 238 of file util.h.

Field Documentation

◆ finalize

fsl_finalizer fsl_state::finalize

Finalizer for this->state.

If used, it should be called like:

this->finalize.f( this->finalize.state, this->state );
fsl_finalizer finalize
Finalizer for this->state.
Definition util.h:253

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

Definition at line 253 of file util.h.

◆ state

void* fsl_state::state

Arbitrary context-dependent state.

Definition at line 242 of file util.h.


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