Previous: , Up: handlers accessors   [Contents][Index]


5.5.2 Accessing the destructor

Every handler instance may hold a pointer to a destructor function for the managed resource. The following accessor functions allow us to retrieve such a pointer.

All the following definitions are accessible from the header file ccexceptions.h.

Function: void * cce_clean_handler_resource_destructor (cce_clean_handler_t const * H)
Function: void * cce_error_handler_resource_destructor (cce_error_handler_t const * H)

Return the pointer to resource stored in the given handler.

Preprocessor Macro: void * cce_handler_resource_destructor (cce_clean_handler_t * H)
Preprocessor Macro: void * cce_handler_resource_destructor (cce_error_handler_t * H)

Generic macro using _Generic to dispatch its expansion depending on the type of the argument H. If the type of structure referenced by H is:

cce_clean_handler_t
cce_clean_handler_t

Expand into a call to cce_clean_handler_resource_destructor().

cce_error_handler_t

Expand into a call to cce_error_handler_resource_destructor().


Previous: , Up: handlers accessors   [Contents][Index]

This document describes version 0.9.0-devel.3 of CCExceptions.