aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alMain.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-05-21 13:27:27 -0700
committerChris Robinson <[email protected]>2013-05-21 13:27:27 -0700
commit604726c6392e6deefa9648ef6f8044ccf85ac1fa (patch)
treed569ca72b3883be9ef6d8be5ff11ea232d7b085d /OpenAL32/Include/alMain.h
parenteaccaa50284da45401d841a867a7a10daa00dbd0 (diff)
Add a DELETE macro to help destroy objects
Diffstat (limited to 'OpenAL32/Include/alMain.h')
-rw-r--r--OpenAL32/Include/alMain.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index fc078175..c7ad6418 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -70,6 +70,9 @@ static const union {
#define SET_VTABLE1(T1, obj) ((obj)->vtbl = &(T1##_vtable))
#define SET_VTABLE2(T1, T2, obj) SET_VTABLE1(T1##_##T2, STATIC_CAST(T2, (obj)))
+#define NEW(T) (T##Factory_getFactory()->create())
+#define DELETE(obj) ((obj)->vtbl->getCreator()->vtbl->destroy((obj)))
+
#ifdef _WIN32