1 | /* |
1 | /* |
2 | * Copyright © 2007 William Pitcock <nenolod -at- atheme.org> |
2 | * Copyright © 2007 William Pitcock <nenolod -at- atheme.org> |
3 | * Rights to this code are as documented in doc/pod/license.pod. |
3 | * Rights to this code are as documented in doc/pod/license.pod. |
4 | * |
4 | * |
5 | * Object management. |
5 | * Object management. |
6 | * |
6 | * |
7 | * $Id: object.h,v 1.2 2007/07/21 01:29:07 pippijn Exp $ |
7 | * $Id: object.h,v 1.3 2007/08/28 17:08:07 pippijn Exp $ |
8 | */ |
8 | */ |
9 | |
9 | |
10 | #ifndef OBJECT_H |
10 | #ifndef OBJECT_H |
11 | #define OBJECT_H |
11 | #define OBJECT_H |
12 | |
12 | |
… | |
… | |
47 | } |
47 | } |
48 | }; |
48 | }; |
49 | |
49 | |
50 | typedef void (*destructor_t) (void *); |
50 | typedef void (*destructor_t) (void *); |
51 | |
51 | |
52 | struct object_t |
52 | struct object_t : zero_initialised |
53 | { |
53 | { |
54 | char *name; |
54 | char *name; |
55 | int refcount; |
55 | int refcount; |
56 | destructor_t destructor; |
56 | destructor_t destructor; |
57 | }; |
57 | }; |