libcomps ..
Loading...
Searching...
No Matches
comps_mm.h
Go to the documentation of this file.
1/* libcomps - C alternative to yum.comps library
2 * Copyright (C) 2013 Jindrich Luza
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17 * USA
18 */
19
20#ifndef COMPS_MM_H
21#define COMPS_MM_H
22
23#include <stdlib.h>
24#include <string.h>
25#include <signal.h>
26
36typedef struct {
37 size_t ref_count;
38 void (*destructor)(void*);
40 void *obj;
42
44COMPS_RefC* comps_refc_create(void *obj, void (*destructor)(void*));
45
51
55void comps_refc_destroy_v(void *refc);
56
61
65
66#endif //COMPS_MM_H
void comps_refc_destroy(COMPS_RefC *refc)
Definition comps_mm.c:34
COMPS_RefC * comps_refc_create(void *obj, void(*destructor)(void *))
Definition comps_mm.c:21
void comps_refc_destroy_v(void *refc)
Definition comps_mm.c:43
void comps_refc_incref(COMPS_RefC *refc)
Definition comps_mm.c:51
void comps_refc_decref(COMPS_RefC *refc)
Definition comps_mm.c:47
Definition comps_mm.h:36
void * obj
Definition comps_mm.h:40
size_t ref_count
Definition comps_mm.h:37