diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-11-29 13:03:15 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-11-29 13:03:15 (GMT) |
commit | eca25ffa988872763ee91c496912bf2d22a0819f (patch) | |
tree | 327d2fb917db2580f8f17afb3d093f83a87f35c0 /generic | |
parent | b91af81bc4ee0138c07c96e938c4878e0a8c06d9 (diff) | |
download | tcl-eca25ffa988872763ee91c496912bf2d22a0819f.zip tcl-eca25ffa988872763ee91c496912bf2d22a0819f.tar.gz tcl-eca25ffa988872763ee91c496912bf2d22a0819f.tar.bz2 |
Minor simplifications. Eliminate FUNCPRT from regexp engine. Fix compile-error (non-debug) in tclDictObj.c, from previous commit
Diffstat (limited to 'generic')
-rw-r--r-- | generic/regcustom.h | 1 | ||||
-rw-r--r-- | generic/regguts.h | 13 | ||||
-rw-r--r-- | generic/tclCkalloc.c | 2 | ||||
-rw-r--r-- | generic/tclDictObj.c | 2 | ||||
-rw-r--r-- | generic/tclRegexp.h | 2 |
5 files changed, 5 insertions, 15 deletions
diff --git a/generic/regcustom.h b/generic/regcustom.h index 1f00bf4..c4dbc73 100644 --- a/generic/regcustom.h +++ b/generic/regcustom.h @@ -36,7 +36,6 @@ * Overrides for regguts.h definitions, if any. */ -#define FUNCPTR(name, args) (*name)args #define MALLOC(n) (void*)(attemptckalloc(n)) #define FREE(p) ckfree((void*)(p)) #define REALLOC(p,n) (void*)(attemptckrealloc((void*)(p),n)) diff --git a/generic/regguts.h b/generic/regguts.h index 9461136..ad9d5b9 100644 --- a/generic/regguts.h +++ b/generic/regguts.h @@ -49,15 +49,6 @@ #include <assert.h> #endif -/* function-pointer declarator */ -#ifndef FUNCPTR -#if __STDC__ >= 1 -#define FUNCPTR(name, args) (*name)args -#else -#define FUNCPTR(name, args) (*name)() -#endif -#endif - /* memory allocation */ #ifndef MALLOC #define MALLOC(n) malloc(n) @@ -391,7 +382,7 @@ struct subre { */ struct fns { - void FUNCPTR(free, (regex_t *)); + void (*free) (regex_t *); }; /* @@ -408,7 +399,7 @@ struct guts { struct cnfa search; /* for fast preliminary search */ int ntree; /* number of subre's, plus one */ struct colormap cmap; - int FUNCPTR(compare, (const chr *, const chr *, size_t)); + int (*compare) (const chr *, const chr *, size_t); struct subre *lacons; /* lookahead-constraint vector */ int nlacons; /* size of lacons */ }; diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index f30374f..d42536e 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -33,7 +33,7 @@ * "memory tag" command is invoked, to hold the current tag. */ - typedef struct MemTag { +typedef struct MemTag { size_t refCount; /* Number of mem_headers referencing this * tag. */ char string[1]; /* Actual size of string will be as large as diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index d755855..1115999 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -1382,7 +1382,7 @@ Tcl_NewDictObj(void) InitChainTable(dict); dict->epoch = 0; dict->chain = NULL; - dict->refcount = 1; + dict->refCount = 1; DICT(dictPtr) = dict; dictPtr->internalRep.twoPtrValue.ptr2 = NULL; dictPtr->typePtr = &tclDictType; diff --git a/generic/tclRegexp.h b/generic/tclRegexp.h index 3b2433e..eac0aaa 100644 --- a/generic/tclRegexp.h +++ b/generic/tclRegexp.h @@ -37,7 +37,7 @@ typedef struct TclRegexp { * of subexpressions. */ rm_detail_t details; /* Detailed information on match (currently * used only for REG_EXPECT). */ - int refCount; /* Count of number of references to this + unsigned int refCount; /* Count of number of references to this * compiled regexp. */ } TclRegexp; |