Tcl Source Code

Check-in [4ed9ffe536]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix [1e48483c8b]: Use of non-standard C code in TCLBOOLWARNING
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | main
Files: files | file ages | folders
SHA3-256: 4ed9ffe536485ccf23db5739b781414fba3bbabf122ec3814ab1861b2aeaae9c
User & Date: jan.nijtmans 2024-04-26 13:00:46
Context
2024-04-27
09:30
Fix [9a8ce8af3d] - test suite hang in io-28.6 check-in: 1faf4d8e12 user: apnadkarni tags: trunk, main
2024-04-26
17:02
Fix test for [9a8ce8af3d] Closed-Leaf check-in: 4cb226a8d1 user: apnadkarni tags: bug-9a8ce8af3d
13:00
Fix [1e48483c8b]: Use of non-standard C code in TCLBOOLWARNING check-in: 4ed9ffe536 user: jan.nijtmans tags: trunk, main
12:59
Fix [1e48483c8b]: Use of non-standard C code in TCLBOOLWARNING check-in: b43de757cc user: jan.nijtmans tags: core-8-branch
2024-04-25
19:49
Fix dict performance bug: Remove abstractlist extension from dict objtype. check-in: 0c1a114cc4 user: griffin tags: trunk, main
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclDecls.h.

4028
4029
4030
4031
4032
4033
4034


4035
4036
4037
4038
4039
4040
4041
4042
#define Tcl_GetString(objPtr) \
	Tcl_GetStringFromObj(objPtr, (Tcl_Size *)NULL)
#define Tcl_GetUnicode(objPtr) \
	Tcl_GetUnicodeFromObj(objPtr, (Tcl_Size *)NULL)
#undef Tcl_GetIndexFromObjStruct
#undef Tcl_GetBooleanFromObj
#undef Tcl_GetBoolean


#ifdef __GNUC__
	/* If this gives: "error: size of array ‘_bool_Var’ is negative", it means that sizeof(*boolPtr)>sizeof(int), which is not allowed */
#   define TCLBOOLWARNING(boolPtr) ({__attribute__((unused)) char _bool_Var[sizeof(*(boolPtr)) > sizeof(int) ? -1 : 1];}),
#else
#   define TCLBOOLWARNING(boolPtr)
#endif
#if defined(USE_TCL_STUBS)
#define Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags, indexPtr) \







>
>
|







4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
#define Tcl_GetString(objPtr) \
	Tcl_GetStringFromObj(objPtr, (Tcl_Size *)NULL)
#define Tcl_GetUnicode(objPtr) \
	Tcl_GetUnicodeFromObj(objPtr, (Tcl_Size *)NULL)
#undef Tcl_GetIndexFromObjStruct
#undef Tcl_GetBooleanFromObj
#undef Tcl_GetBoolean
#if !defined(__cplusplus) && !defined(BUILD_tcl) && !defined(BUILD_tk)
#	define TCLBOOLWARNING(boolPtr) (void)(sizeof(struct {_Static_assert(sizeof(*(boolPtr)) <= sizeof(int), "sizeof(boolPtr) too large");int dummy;})),
#elif defined(__GNUC__)
	/* If this gives: "error: size of array ‘_bool_Var’ is negative", it means that sizeof(*boolPtr)>sizeof(int), which is not allowed */
#   define TCLBOOLWARNING(boolPtr) ({__attribute__((unused)) char _bool_Var[sizeof(*(boolPtr)) > sizeof(int) ? -1 : 1];}),
#else
#   define TCLBOOLWARNING(boolPtr)
#endif
#if defined(USE_TCL_STUBS)
#define Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags, indexPtr) \