summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-01-12 14:19:04 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-01-12 14:19:04 (GMT)
commit2fa8967c62a728986e69c0adfcc433c8da2d6dd4 (patch)
tree2da0e541ba3942cb57eb71026b48e3a6b04c74ba /generic
parent5608e51a46c5ddb594d05a3d9cbeace701b5dcc6 (diff)
downloadtcl-2fa8967c62a728986e69c0adfcc433c8da2d6dd4.zip
tcl-2fa8967c62a728986e69c0adfcc433c8da2d6dd4.tar.gz
tcl-2fa8967c62a728986e69c0adfcc433c8da2d6dd4.tar.bz2
Proposed 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