summaryrefslogtreecommitdiffstats
path: root/generic/tclZipfs.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-12 15:28:49 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-12 15:28:49 (GMT)
commit381a91b6b63a4bcfb7f5b437d6e88b8092c34d5d (patch)
tree71ed4470d3b528518ea396d313e30c1a2b9d8387 /generic/tclZipfs.c
parent514ebbd809f0096609a5971c1861a99460e77e73 (diff)
parent3dabdeb955d3db0991b55e0f9ea4aed178b4cc18 (diff)
downloadtcl-381a91b6b63a4bcfb7f5b437d6e88b8092c34d5d.zip
tcl-381a91b6b63a4bcfb7f5b437d6e88b8092c34d5d.tar.gz
tcl-381a91b6b63a4bcfb7f5b437d6e88b8092c34d5d.tar.bz2
Merge 9.0
Diffstat (limited to 'generic/tclZipfs.c')
-rw-r--r--generic/tclZipfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index 6e73716..8b68811 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -27,7 +27,6 @@
#define MAP_FILE 0
#endif /* !MAP_FILE */
#define NOBYFOUR
-#define crc32tab crc_table[0]
#ifndef TBLS
#define TBLS 1
#endif
@@ -75,6 +74,8 @@
#include "zutil.h"
#include "crc32.h"
+static const z_crc_t* crc32tab;
+
/*
** We are compiling as part of the core.
** TIP430 style zipfs prefix
@@ -1849,6 +1850,7 @@ ZipfsSetup(void)
Tcl_MutexUnlock(&ZipFSMutex);
#endif /* TCL_THREADS */
+ crc32tab = get_crc_table();
Tcl_FSRegister(NULL, &zipfsFilesystem);
Tcl_InitHashTable(&ZipFS.fileHash, TCL_STRING_KEYS);
Tcl_InitHashTable(&ZipFS.zipHash, TCL_STRING_KEYS);