From d00c058c4602bf4c6064fb37419e9ade5258a9ce Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Mon, 1 Jul 2024 02:22:21 +0800 Subject: [PATCH] Delete refcount.h --- include/pocketpy/common/refcount.h | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 include/pocketpy/common/refcount.h diff --git a/include/pocketpy/common/refcount.h b/include/pocketpy/common/refcount.h deleted file mode 100644 index 8623cd39..00000000 --- a/include/pocketpy/common/refcount.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -// ref counting -typedef struct RefCounted { - int count; - void (*dtor)(void*); -} RefCounted; - -#define PK_INCREF(obj) (obj)->rc.count++ -#define PK_DECREF(obj) do { \ - if(--(obj)->rc.count == 0) { \ - (obj)->rc.dtor(obj); \ - free(obj); \ - } \ -} while(0) - -#ifdef __cplusplus -} -#endif \ No newline at end of file