summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXDebug.h
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXDebug.h')
-rw-r--r--macosx/tkMacOSXDebug.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/macosx/tkMacOSXDebug.h b/macosx/tkMacOSXDebug.h
index f57fc71..df3c00c 100644
--- a/macosx/tkMacOSXDebug.h
+++ b/macosx/tkMacOSXDebug.h
@@ -50,7 +50,7 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXDebug.h,v 1.2.2.4 2005/11/27 02:36:46 das Exp $
+ * RCS: @(#) $Id: tkMacOSXDebug.h,v 1.2.2.5 2006/01/10 05:38:20 das Exp $
*/
#ifndef _TKMACDEBUG
@@ -79,6 +79,15 @@ char * TkMacOSXMenuMessageToAscii(int msg, char * s);
char * MouseTrackingResultToAscii(MouseTrackingResult r, char * buf );
+void * TkMacOSXGetNamedDebugSymbol(const char* module, const char* symbol);
+
+/* Macro to abstract common use of TkMacOSXGetNamedDebugSymbol to initialize named symbols */
+#define TkMacOSXInitNamedDebugSymbol(module, ret, symbol, ...) \
+ static ret (* symbol)(__VA_ARGS__) = (void*)(-1L); \
+ if (symbol == (void*)(-1L)) { \
+ symbol = TkMacOSXGetNamedDebugSymbol(STRINGIFY(module), STRINGIFY(_##symbol));\
+ }
+
#endif
#endif