summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-01-13 13:20:53 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-01-13 13:20:53 (GMT)
commit71c8acf7e6000d377ec146dae352142ad9c3b5f3 (patch)
treeb6f67dba6f27b7aa0a366f9080abf44cef1f2785 /generic
parentd679a49bc0da1e368daa6af07fcf72af2e3dceb4 (diff)
parent2fa8967c62a728986e69c0adfcc433c8da2d6dd4 (diff)
downloadtcl-71c8acf7e6000d377ec146dae352142ad9c3b5f3.zip
tcl-71c8acf7e6000d377ec146dae352142ad9c3b5f3.tar.gz
tcl-71c8acf7e6000d377ec146dae352142ad9c3b5f3.tar.bz2
Fix for [26f1328a86]: sizeof(int) < sizeof(void*) -> Crash
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompile.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index 03b4a90..997f08e 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -1509,22 +1509,22 @@ MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData,
# define TclGetInt1AtPtr(p) ((int) *((signed char *) p))
#else
# define TclGetInt1AtPtr(p) \
- (((int) *((char *) p)) | ((*(p) & 0200) ? (-256) : 0))
+ ((int) ((*((char *) p)) | ((*(p) & 0200) ? (-256) : 0)))
#endif
#define TclGetInt4AtPtr(p) \
- (((int) (TclGetUInt1AtPtr(p) << 24)) | \
- (*((p)+1) << 16) | \
- (*((p)+2) << 8) | \
- (*((p)+3)))
+ ((int) ((TclGetUInt1AtPtr(p) << 24) | \
+ (*((p)+1) << 16) | \
+ (*((p)+2) << 8) | \
+ (*((p)+3))))
#define TclGetUInt1AtPtr(p) \
((unsigned int) *(p))
#define TclGetUInt4AtPtr(p) \
- ((unsigned int) (*(p) << 24) | \
- (*((p)+1) << 16) | \
- (*((p)+2) << 8) | \
- (*((p)+3)))
+ ((unsigned int) ((*(p) << 24) | \
+ (*((p)+1) << 16) | \
+ (*((p)+2) << 8) | \
+ (*((p)+3))))
/*
* Macros used to compute the minimum and maximum of two integers. The ANSI C