summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-06-10 20:25:54 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-06-10 20:25:54 (GMT)
commitf5d80971097cf57bdbe909fc600276f8670eaf9d (patch)
tree59689956cdc2f9a9567ae1da9764d77ba651689a /generic/tclInt.h
parent5921307059d261f04a77cfeb4c0658454884c646 (diff)
downloadtcl-f5d80971097cf57bdbe909fc600276f8670eaf9d.zip
tcl-f5d80971097cf57bdbe909fc600276f8670eaf9d.tar.gz
tcl-f5d80971097cf57bdbe909fc600276f8670eaf9d.tar.bz2
* generic/tclInt.h:
* generic/tclNamesp.c: * generic/tclObj.c: * generic/tclvar.c: new macros TclGetCurrentNamespace() and TclGetGlobalNamespace(); Tcl_GetCommandFromObj and TclGetNamespaceFromObj rewritten to make the logic clearer; slightly faster too.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index dc0efa7..f3c7c5e 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.315 2007/06/10 00:08:30 msofer Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.316 2007/06/10 20:25:55 msofer Exp $
*/
#ifndef _TCLINT
@@ -3405,6 +3405,17 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum,
/*
*----------------------------------------------------------------
+ * Inline version of Tcl_GetCurrentNamespace and Tcl_GetGlobalNamespace
+ */
+
+#define TclGetCurrentNamespace(interp) \
+ (Tcl_Namespace *) ((Interp *)(interp))->varFramePtr->nsPtr
+
+#define TclGetGlobalNamespace(interp) \
+ (Tcl_Namespace *) ((Interp *)(interp))->globalNsPtr
+
+/*
+ *----------------------------------------------------------------
* Inline version of TclCleanupCommand; still need the function as it is in
* the internal stubs, but the core can use the macro instead.
*/