deprecate refs
This commit is contained in:
parent
5b2e2b248d
commit
3ecadebcfd
2 changed files with 8 additions and 2 deletions
|
@ -15,6 +15,9 @@
|
|||
* NOTE: if you're here to attempt fixing any of this braindeath, better just delete the file and start over
|
||||
*/
|
||||
|
||||
PRAGMA(message "Delete this file when no users left")
|
||||
DIAGNOSTIC(ignored "-Wdeprecated-declarations")
|
||||
|
||||
void *_FREEREF;
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -20,15 +20,18 @@ typedef struct {
|
|||
int refs;
|
||||
} Reference;
|
||||
|
||||
#define DEPRECATED_REFS \
|
||||
attr_deprecated("Use tasks and boxed entities instead")
|
||||
|
||||
typedef struct {
|
||||
Reference *ptrs;
|
||||
Reference *ptrs DEPRECATED_REFS;
|
||||
int count;
|
||||
} RefArray;
|
||||
|
||||
extern void *_FREEREF;
|
||||
#define FREEREF &_FREEREF
|
||||
#define REF(p) (global.refs.ptrs[(int)(p)].ptr)
|
||||
int add_ref(void *ptr);
|
||||
int add_ref(void *ptr) DEPRECATED_REFS;
|
||||
void del_ref(void *ptr);
|
||||
void free_ref(int i);
|
||||
void free_all_refs(void);
|
||||
|
|
Loading…
Reference in a new issue