Check-in [ee6f77054c]

Login

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

Overview
Comment:new TIP: 528
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:ee6f77054cb723275ad467f01aa5c04b2cff8004427be6e1deb4f8639fc3dbe1
User & Date: jan.nijtmans 2018-12-06 13:54:03
Context
2018-12-06
13:57
Tk-version -> Tcl-version check-in: 70b1f60628 user: jan.nijtmans tags: trunk
13:54
new TIP: 528 check-in: ee6f77054c user: jan.nijtmans tags: trunk
2018-12-03
19:20
New version of TIP #507 by RenĂ© Zaumseil check-in: e709b1ffa6 user: fvogel tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to index.json.

1

2
3
4
5
6
7
8
...
524
525
526
527
528
529
530
531
532
{"tip": {

	"527":{"url":"./tip/527.md","created":"26-Nov-2018","post-history":"","state":"Draft","tcl-branch":"sebres-8-6-timerate","tcl-version":"8.5","vote":"Pending","type":"Project","title":"# TIP 527: New measurement facilities in TCL: New command timerate.","discussions-to":"news:comp.lang.tcl","author":["Sergey G. Brester <sebres@users.sourceforge.net>"],"is-jest":false},
	"526":{"url":"./tip/526.md","created":"08-Nov-2018","post-history":"","state":"Draft","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 526: Make [expr] Only Accept One Argument","author":["Donal K. Fellows <donal.k.fellows@manchester.ac.uk>"],"is-jest":false},
	"525":{"url":"./tip/525.md","keywords":"Tcl, testing, continuous integration","state":"Final","type":"Project","author":["Donal K. Fellows <donal.k.fellows@manchester.ac.uk>"],"vote-results":"8/0/0 accepted","votes-for":"KBK, SL, AF, DGP, FV, DKF, AK, JN","votes-against":"none","created":"24-Oct-2018","title":"# TIP 525: Make Tcltest Report Overall Success in a Machine-Readable Way","post-history":"","vote":"Done","tcl-version":"8.5","votes-present":"none","is-jest":false},
	"524":{"url":"./tip/524.md","keywords":"Tcl, object orientation, customization","state":"Final","vote-summary":"Accepted 2/0/4","type":"Project","author":["Donal K. Fellows <donal.k.fellows@manchester.ac.uk>"],"votes-against":"none","votes-for":"DKF, JN","created":"23-Oct-2018","title":"# TIP 524: Custom Definition Dialects for TclOO","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-524","votes-present":"BG, KBK, FV, SL","is-jest":false},
	"523":{"url":"./tip/523.md","keywords":"queue, stack, pop","state":"Final","vote-summary":"Accepted 7/0/0","type":"Project","author":["Peter Spjuth <peter.spjuth@gmail.com>"],"votes-against":"none","votes-for":"DKF, BG, KBK, JN, DGP, FV, SL","created":"22-Oct-2018","title":"# TIP 523: New lpop command","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-523","votes-present":"none","is-jest":false},
	"522":{"url":"./tip/522.md","keywords":"tcltest, error codes","state":"Final","type":"Project","author":["Peter Spjuth <peter.spjuth@gmail.com>"],"vote-results":"8/0/0 accepted","votes-for":"KBK, SL, AF, DGP, FV, DKF, AK, JN","votes-against":"none","created":"22-Oct-2018","title":"# TIP 522: Test error codes with Tcltest","post-history":"","tcl-branch":"tip-522","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false},
	"521":{"url":"./tip/521.md","keywords":"Tcl, floating point, NaN, not a number","created":"21 October 2018","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 521: Floating Point Classification Functions","author":["Kevin B. Kenny <kevin.b.kenny@gmail.com>"],"is-jest":false},
................................................................................
	"5":{"url":"./tip/5.md","created":"17-Oct-2000","post-history":"","state":"Final","vote":"Done","tcl-version":"8.4","type":"Project","title":"# TIP 5: Make TkClassProcs and TkSetClassProcs Public and Extensible","author":["Eric Melski <ericm@ajubasolutions.com>"],"is-jest":false},
	"4":{"url":"./tip/4.md","created":"26-Oct-2000","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 4: Tcl Release and Distribution Philosophy","discussions-to":"news:comp.lang.tcl","author":["Brent Welch <welch@acm.org>","Donal K. Fellows <fellowsd@cs.man.ac.uk>","Larry W. Virden <lvirden@cas.org>","Larry W. Virden <lvirden@yahoo.com>"],"is-jest":false},
	"3":{"url":"./tip/3.md","created":"14-Sep-2000","post-history":"","state":"Accepted","vote":"Done","type":"Process","title":"# TIP 3: TIP Format","author":["Andreas Kupries <a.kupries@westend.com>","Donal K. Fellows <fellowsd@cs.man.ac.uk>"],"is-jest":false},
	"2":{"url":"./tip/2.md","created":"12-Sep-2000","post-history":"","state":"Draft","vote":"Pending","type":"Process","title":"# TIP 2: TIP Guidelines","author":["Andreas Kupries <a.kupries@westend.com>","Donal K. Fellows <fellowsd@cs.man.ac.uk>","Don Porter <dgp@users.sourceforge.net>","Mo DeJong <no@spam.com>","Larry W. Virden <lvirden@yahoo.com>","Kevin Kenny <kennykb@acm.org>"],"is-jest":false},
	"1":{"url":"./tip/1.md","created":"14-Sep-2000","post-history":"","state":"Active","vote":"No voting","type":"Informational","title":"# TIP 1: TIP Index","author":["TIP Editor <donal.fellows@cs.man.ac.uk>"],"is-jest":false},
	"0":{"url":"./tip/0.md","created":"11-Dec-2000","post-history":"","state":"Final","vote":"Done","type":"Process","title":"# TIP 0: Tcl Core Team Basic Rules","author":["John Ousterhout <ouster@pacbell.net>"],"is-jest":false},
	"@min": 0,
	"@max": 527
}, "@timestamp": 1543864539}

>







 







|
|
1
2
3
4
5
6
7
8
9
...
525
526
527
528
529
530
531
532
533
{"tip": {
	"528":{"url":"./tip/528.md","created":"05-Dec-2018","post-history":"","state":"Draft","tk-branch":"offsetof","tk-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 528: Deprecate Tk_Offset()","author":["Jan Nijtmans <jan.nijtmans@gmail.com>"],"is-jest":false},
	"527":{"url":"./tip/527.md","created":"26-Nov-2018","post-history":"","state":"Draft","tcl-branch":"sebres-8-6-timerate","tcl-version":"8.5","vote":"Pending","type":"Project","title":"# TIP 527: New measurement facilities in TCL: New command timerate.","discussions-to":"news:comp.lang.tcl","author":["Sergey G. Brester <sebres@users.sourceforge.net>"],"is-jest":false},
	"526":{"url":"./tip/526.md","created":"08-Nov-2018","post-history":"","state":"Draft","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 526: Make [expr] Only Accept One Argument","author":["Donal K. Fellows <donal.k.fellows@manchester.ac.uk>"],"is-jest":false},
	"525":{"url":"./tip/525.md","keywords":"Tcl, testing, continuous integration","state":"Final","type":"Project","author":["Donal K. Fellows <donal.k.fellows@manchester.ac.uk>"],"vote-results":"8/0/0 accepted","votes-for":"KBK, SL, AF, DGP, FV, DKF, AK, JN","votes-against":"none","created":"24-Oct-2018","title":"# TIP 525: Make Tcltest Report Overall Success in a Machine-Readable Way","post-history":"","vote":"Done","tcl-version":"8.5","votes-present":"none","is-jest":false},
	"524":{"url":"./tip/524.md","keywords":"Tcl, object orientation, customization","state":"Final","vote-summary":"Accepted 2/0/4","type":"Project","author":["Donal K. Fellows <donal.k.fellows@manchester.ac.uk>"],"votes-against":"none","votes-for":"DKF, JN","created":"23-Oct-2018","title":"# TIP 524: Custom Definition Dialects for TclOO","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-524","votes-present":"BG, KBK, FV, SL","is-jest":false},
	"523":{"url":"./tip/523.md","keywords":"queue, stack, pop","state":"Final","vote-summary":"Accepted 7/0/0","type":"Project","author":["Peter Spjuth <peter.spjuth@gmail.com>"],"votes-against":"none","votes-for":"DKF, BG, KBK, JN, DGP, FV, SL","created":"22-Oct-2018","title":"# TIP 523: New lpop command","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-523","votes-present":"none","is-jest":false},
	"522":{"url":"./tip/522.md","keywords":"tcltest, error codes","state":"Final","type":"Project","author":["Peter Spjuth <peter.spjuth@gmail.com>"],"vote-results":"8/0/0 accepted","votes-for":"KBK, SL, AF, DGP, FV, DKF, AK, JN","votes-against":"none","created":"22-Oct-2018","title":"# TIP 522: Test error codes with Tcltest","post-history":"","tcl-branch":"tip-522","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false},
	"521":{"url":"./tip/521.md","keywords":"Tcl, floating point, NaN, not a number","created":"21 October 2018","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 521: Floating Point Classification Functions","author":["Kevin B. Kenny <kevin.b.kenny@gmail.com>"],"is-jest":false},
................................................................................
	"5":{"url":"./tip/5.md","created":"17-Oct-2000","post-history":"","state":"Final","vote":"Done","tcl-version":"8.4","type":"Project","title":"# TIP 5: Make TkClassProcs and TkSetClassProcs Public and Extensible","author":["Eric Melski <ericm@ajubasolutions.com>"],"is-jest":false},
	"4":{"url":"./tip/4.md","created":"26-Oct-2000","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 4: Tcl Release and Distribution Philosophy","discussions-to":"news:comp.lang.tcl","author":["Brent Welch <welch@acm.org>","Donal K. Fellows <fellowsd@cs.man.ac.uk>","Larry W. Virden <lvirden@cas.org>","Larry W. Virden <lvirden@yahoo.com>"],"is-jest":false},
	"3":{"url":"./tip/3.md","created":"14-Sep-2000","post-history":"","state":"Accepted","vote":"Done","type":"Process","title":"# TIP 3: TIP Format","author":["Andreas Kupries <a.kupries@westend.com>","Donal K. Fellows <fellowsd@cs.man.ac.uk>"],"is-jest":false},
	"2":{"url":"./tip/2.md","created":"12-Sep-2000","post-history":"","state":"Draft","vote":"Pending","type":"Process","title":"# TIP 2: TIP Guidelines","author":["Andreas Kupries <a.kupries@westend.com>","Donal K. Fellows <fellowsd@cs.man.ac.uk>","Don Porter <dgp@users.sourceforge.net>","Mo DeJong <no@spam.com>","Larry W. Virden <lvirden@yahoo.com>","Kevin Kenny <kennykb@acm.org>"],"is-jest":false},
	"1":{"url":"./tip/1.md","created":"14-Sep-2000","post-history":"","state":"Active","vote":"No voting","type":"Informational","title":"# TIP 1: TIP Index","author":["TIP Editor <donal.fellows@cs.man.ac.uk>"],"is-jest":false},
	"0":{"url":"./tip/0.md","created":"11-Dec-2000","post-history":"","state":"Final","vote":"Done","type":"Process","title":"# TIP 0: Tcl Core Team Basic Rules","author":["John Ousterhout <ouster@pacbell.net>"],"is-jest":false},
	"@min": 0,
	"@max": 528
}, "@timestamp": 1544006145}

Changes to index.md.

116
117
118
119
120
121
122







123
124
125
126
127
128
129
<th>Type</th>
<th>Tcl Version</th>
<th>Status</th>
<th>Title</th>
<th>Impl.</th>
</tr></thead><tbody>








<tr class='project projectdraft projectdraft85 project85'>
<td valign='top'><a href='./tip/527.md'>527</a></td>
<td valign='top'>Project</td>
<td valign='top'>8.5</td>
<td valign='top'>Draft</td>
<td valign='top'># TIP 527: New measurement facilities in TCL: New command timerate.</td>
<td valign='top'><a href='/tcl/timeline?r=sebres-8-6-timerate'>Link</a></td>







>
>
>
>
>
>
>







116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<th>Type</th>
<th>Tcl Version</th>
<th>Status</th>
<th>Title</th>
<th>Impl.</th>
</tr></thead><tbody>

<tr class='project projectdraft'>
<td valign='top'><a href='./tip/528.md'>528</a></td>
<td valign='top' colspan=2>Project</td>
<td valign='top'>Draft</td>
<td valign='top'># TIP 528: Deprecate Tk_Offset()</td>
<td valign='top'><a href='/tk/timeline?r=offsetof'>Link</a></td>
</tr>
<tr class='project projectdraft projectdraft85 project85'>
<td valign='top'><a href='./tip/527.md'>527</a></td>
<td valign='top'>Project</td>
<td valign='top'>8.5</td>
<td valign='top'>Draft</td>
<td valign='top'># TIP 527: New measurement facilities in TCL: New command timerate.</td>
<td valign='top'><a href='/tcl/timeline?r=sebres-8-6-timerate'>Link</a></td>

Added tip/528.md.











































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# TIP 528: Deprecate Tk_Offset()
	Author:         Jan Nijtmans <jan.nijtmans@gmail.com>
	State:          Draft
	Type:           Project
	Vote:           Pending
	Created:        05-Dec-2018
	Post-History:   
	Tk-Version:    8.7
	Tk-Branch:     offsetof
-----

# Abstract

This TIP proposes to deprecate `Tk_Offset()` in favour of [`offsetof()`](https://en.wikipedia.org/wiki/Offsetof).

# Rationale

The `Tk_Offset()` macro comes from the past, when C's official [`offsetof()`](https://en.wikipedia.org/wiki/Offsetof)
macro didn't exist yet, or was not supported yet by all compilers.

The main difference between `Tk_Offset()` and [`offsetof()`](https://en.wikipedia.org/wiki/Offsetof)
is the type: `Tk_Offset()` gives an `int` while `offsetof()` gives a `size_t`. `size_t` is actually
more correct, because it cannot become negative and it allows for values >= 4Gb on 64-bit platforms.

# Proposed Change

This TIP proposes to deprecate the `Tk_Offset()` macro. Starting with
Tk 8.7, when compiling an extension with the flag `-DTK_NO_DEPRECATED`,
`Tk_Offset()` will no longer be provided by tk.h. All occurrences
of `Tk_Offset()` within Tk itself are replaced by `offsetof()`.

This TIP doesn't propose to remove `Tk_Offset()` altogether, since there
are too many extensions still using it.

Further on, it makes sense to change various struct member types from
`int` to `size_t`, to make room for this enhancements. For reasons
of upwards compatibility, providing a smooth upgrade path, when
compiling Tk against Tcl 8.x headers, the type of those struct
members will continue to be `int`.

While on it, this TIP proposes to change the `src` and `dst` members
of `Tk_ArgvInfo` from `char *` to `void *`. Although unrelated to
the other proposed changes, this allows various type casts to
be eliminated in the source code of Tk (and possibly in extensions).
Since those fields are used to store untyped pointers, this is
actually a bug-fix which should not need a TIP, but since it affects
the documentation it doesn't hurt to provide this change in a TIP anyway.

An implementation of this TIP can be found in the [\[offsetof\]](https://core.tcl.tk/tk/timeline?r=offsetof) branch.

# Copyright

This document has been placed in the public domain.