refcount.h revision c391633a8cc03f0fc3be0b7c424b28acf94bc878
#ifndef __REFCOUNT_H__
#define __REFCOUNT_H__
#include <stddef.h>
/*
* Include this member in your structure in order to be able to use it with
* the refcount_* functions.
*/
#define REFCOUNT_COMMON int REFCOUNT_MEMBER_NAME
/*
* Allocate a new structure that uses reference counting. The resulting pointer
* returned. You must not free the returned pointer manually. It will be freed
* when 'ctx' is freed with talloc_free() and no other references are left.
*/
#type)
/*
* Increment the reference count of 'src' and return it back if we are
* successful. The reference count will be decremented after 'ctx' has been
* released by talloc_free(). The function will return NULL in case of failure.
*/
/*
* These functions should not be used directly. Use the above macros instead.
*/
const char *type_name);
#endif /* !__REFCOUNT_H__ */