You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
530 B

#ifndef _RC_H
#define _RC_H
#ifdef __cplusplus
#define _rc_restrict __restrict
extern "C" {
#else
#define _rc_restrict restrict
#endif
#ifndef __GNUC__
#define _rc_attr(_)
#else
#define _rc_attr(v) __attribute__(v)
#endif
typedef struct rc* rc_t;
void* _rc_restrict rc_malloc(size_t sz) _rc_attr((malloc, alloc_size(1), returns_nonnull));
void rc_free(void* ptr) _rc_attr((nonnull));
void* _rc_attr((may_alias)) rc_clone(void* ptr) _rc_attr((pure, nonnull, returns_nonnull));
#ifdef __cplusplus
}
#endif
#endif /* _RC_H */