diff options
author | sebres <sebres@users.sourceforge.net> | 2017-01-10 22:37:40 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2017-01-10 22:37:40 (GMT) |
commit | 2561cb41c0da4522531af13b664373518e0b8008 (patch) | |
tree | a3a05ab02ffb63422c5dad4dfd40a9259bc9d39e /generic/tclDate.h | |
parent | 6a0616f572c4e550427bf6b6e80b874166c5e3fe (diff) | |
download | tcl-2561cb41c0da4522531af13b664373518e0b8008.zip tcl-2561cb41c0da4522531af13b664373518e0b8008.tar.gz tcl-2561cb41c0da4522531af13b664373518e0b8008.tar.bz2 |
string index tree for fast greedy search of the string (index) by unique string prefix as key;
clock scan rewritten to use string index tries search;
Diffstat (limited to 'generic/tclDate.h')
-rw-r--r-- | generic/tclDate.h | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/generic/tclDate.h b/generic/tclDate.h index 112ed31..2728dd3 100644 --- a/generic/tclDate.h +++ b/generic/tclDate.h @@ -126,24 +126,6 @@ typedef enum ClockMsgCtLiteral { } /* - * Primitives to safe set, reset and free references. - */ - -#define Tcl_UnsetObjRef(obj) \ - if (obj != NULL) { Tcl_DecrRefCount(obj); obj = NULL; } -#define Tcl_InitObjRef(obj, val) \ - obj = val; if (obj) { Tcl_IncrRefCount(obj); } -#define Tcl_SetObjRef(obj, val) \ -if (1) { \ - Tcl_Obj *nval = val; \ - if (obj != nval) { \ - Tcl_Obj *prev = obj; \ - Tcl_InitObjRef(obj, nval); \ - if (prev != NULL) { Tcl_DecrRefCount(prev); }; \ - } \ -} - -/* * Structure containing the fields used in [clock format] and [clock scan] */ @@ -450,7 +432,9 @@ MODULE_SCOPE Tcl_Obj * MODULE_SCOPE Tcl_Obj * ClockMCGet(ClockFmtScnCmdArgs *opts, int mcKey); MODULE_SCOPE Tcl_Obj * - ClockMCGetListIdxDict(ClockFmtScnCmdArgs *opts, int mcKey); + ClockMCGetIdx(ClockFmtScnCmdArgs *opts, int mcKey); +MODULE_SCOPE int ClockMCSetIdx(ClockFmtScnCmdArgs *opts, int mcKey, + Tcl_Obj *valObj); /* tclClockFmt.c module declarations */ |