summaryrefslogtreecommitdiffstats
path: root/generic/tclNRE.h
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclNRE.h')
-rw-r--r--generic/tclNRE.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/generic/tclNRE.h b/generic/tclNRE.h
index 0d13d3a..08ddcd5 100644
--- a/generic/tclNRE.h
+++ b/generic/tclNRE.h
@@ -11,7 +11,7 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* // FIXME: RCS numbering?
- * RCS: @(#) $Id: tclNRE.h,v 1.3 2008/07/18 13:46:46 msofer Exp $
+ * RCS: @(#) $Id: tclNRE.h,v 1.4 2008/07/18 23:29:44 msofer Exp $
*/
@@ -171,6 +171,32 @@ typedef struct TEOV_record {
#define TEBC_DO_EXEC 1 /* MUST NOT be 0 */
#define TEBC_DO_TAILCALL 2
+#define TclNRAddCallback(\
+ interp,\
+ postProcPtr,\
+ data0,\
+ data1,\
+ data2,\
+ data3) \
+ { \
+ TEOV_record *recordPtr; \
+ TEOV_callback *callbackPtr; \
+ \
+ recordPtr = TOP_RECORD(interp); \
+ TclSmallAlloc(sizeof(TEOV_callback), callbackPtr); \
+ \
+ callbackPtr->procPtr = (postProcPtr); \
+ callbackPtr->data[0] = (data0); \
+ callbackPtr->data[1] = (data1); \
+ callbackPtr->data[2] = (data2); \
+ callbackPtr->data[3] = (data3); \
+ \
+ callbackPtr->nextPtr = recordPtr->callbackPtr; \
+ recordPtr->callbackPtr = callbackPtr; \
+ }
+
+
+
/*
* These are only used by TEOV; here for ease of ref. They should move to
* tclBasic.c later on.