]> git.lizzy.rs Git - rust.git/blobdiff - src/rt/rust_refcount.h
rt: get rid of rust_fn and replace with fn_env_pair plus a little cleanup.
[rust.git] / src / rt / rust_refcount.h
index ef7ae1f35e3326ae4d5342dc0af63843d5d533a3..1ed05ec8339598279b25798cd78864fc4c7644dd 100644 (file)
 // Refcounting defines
 typedef unsigned long ref_cnt_t;
 
-#define RUST_REFCOUNTED(T) \
-  RUST_REFCOUNTED_WITH_DTOR(T, delete (T*)this)
-
-#define RUST_REFCOUNTED_WITH_DTOR(T, dtor)      \
-  intptr_t ref_count;      \
-  void ref() { ++ref_count; } \
-  void deref() { if (--ref_count == 0) { dtor; } }
-
 #define RUST_ATOMIC_REFCOUNT()                                             \
 private:                                                                   \
    intptr_t ref_count;                                                     \