summaryrefslogtreecommitdiff
path: root/include/libast_internal.h
diff options
context:
space:
mode:
authorMichael Jennings <mej@kainx.org>2002-02-19 02:56:06 +0000
committerMichael Jennings <mej@kainx.org>2002-02-19 02:56:06 +0000
commitf0a120ae75e640d95a4eede88bc2139df9339835 (patch)
tree6b1da9e216a2bf2e328a19e89509097f0b3a610e /include/libast_internal.h
parent79835d5af0ba6da4354cc73ccbda19421c496aa5 (diff)
downloadlibast-f0a120ae75e640d95a4eede88bc2139df9339835.tar.gz
Mon Feb 18 21:54:25 2002 Michael Jennings (mej)
Mmmmm...reusability. :-) SVN revision: 5955
Diffstat (limited to 'include/libast_internal.h')
-rw-r--r--include/libast_internal.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/libast_internal.h b/include/libast_internal.h
index d0f0ade..c4d944c 100644
--- a/include/libast_internal.h
+++ b/include/libast_internal.h
@@ -50,6 +50,19 @@
# include <stdarg.h>
#endif
+/******************************* OBJECT GOOP ***********************************/
+
+/* Macros to allocate and deallocate memory for an object. For use only in
+ object constructors/destructors, not in end-user programs. */
+#define SPIF_ALLOC(type) SPIF_TYPE(type) MALLOC(sizeof SPIF_CONST_TYPE(type))
+#define SPIF_DEALLOC(obj) FREE(obj)
+
+/* Macros for specifying the classname variables for each class type. Each subclass of
+ spif_obj_t must define this variable using these macros. */
+#define SPIF_DECL_CNVAR(type) "!spif_" #type "_t!"
+#define SPIF_DECL_CLASSNAME(type) spif_classname_t spif_ ## type ## _classname = SPIF_DECL_CNVAR(type)
+
+
/******************************** MSGS GOOP ***********************************/
extern char *libast_program_name, *libast_program_version;