diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-02-05 21:35:10 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-02-05 21:35:10 (GMT) |
commit | 2dad23ad65d5cf76fa7e2516a6702a8a6ff34723 (patch) | |
tree | 0b80be8eba412258b3fa4c109b6b554863d27378 /generic/regex.h | |
parent | eee14742522aed25744851879c80a96134de7369 (diff) | |
download | tcl-2dad23ad65d5cf76fa7e2516a6702a8a6ff34723.zip tcl-2dad23ad65d5cf76fa7e2516a6702a8a6ff34723.tar.gz tcl-2dad23ad65d5cf76fa7e2516a6702a8a6ff34723.tar.bz2 |
More size_t-related consolidations. Now regexp can handle strings >2GB and more. Remove many type-casts which are not necessary any more.
Diffstat (limited to 'generic/regex.h')
-rw-r--r-- | generic/regex.h | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/generic/regex.h b/generic/regex.h index 8845f72..d80784d 100644 --- a/generic/regex.h +++ b/generic/regex.h @@ -89,9 +89,6 @@ extern "C" { #ifdef __REG_WIDE_EXEC #undef __REG_WIDE_EXEC #endif -#ifdef __REG_REGOFF_T -#undef __REG_REGOFF_T -#endif #ifdef __REG_NOFRONT #undef __REG_NOFRONT #endif @@ -100,7 +97,6 @@ extern "C" { #endif /* interface types */ #define __REG_WIDE_T Tcl_UniChar -#define __REG_REGOFF_T long /* not really right, but good enough... */ /* names and declarations */ #define __REG_WIDE_COMPILE TclReComp #define __REG_WIDE_EXEC TclReExec @@ -115,17 +111,6 @@ extern "C" { */ /* - * regoff_t has to be large enough to hold either off_t or ssize_t, and must - * be signed; it's only a guess that long is suitable, so we offer - * <sys/types.h> an override. - */ -#ifdef __REG_REGOFF_T -typedef __REG_REGOFF_T regoff_t; -#else -typedef long regoff_t; -#endif - -/* * other interface types */ @@ -157,8 +142,8 @@ typedef struct { /* result reporting (may acquire more fields later) */ typedef struct { - regoff_t rm_so; /* start of substring */ - regoff_t rm_eo; /* end of substring */ + size_t rm_so; /* start of substring */ + size_t rm_eo; /* end of substring */ } regmatch_t; /* supplementary control and reporting */ |