summaryrefslogtreecommitdiffstats
path: root/generic/tkTextBTree.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-10-06 20:29:39 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-10-06 20:29:39 (GMT)
commit062332b74070e0ca06b5fefaa039efafe402a624 (patch)
tree174261b05a2f8773622a82526e3353049af70b4a /generic/tkTextBTree.c
parent62d36b53b20fdda3e415b341f3767ec1d61b526e (diff)
downloadtk-062332b74070e0ca06b5fefaa039efafe402a624.zip
tk-062332b74070e0ca06b5fefaa039efafe402a624.tar.gz
tk-062332b74070e0ca06b5fefaa039efafe402a624.tar.bz2
Experiment: let's see if we can deprecate Tk_Offset() in favor of offsetof()
Diffstat (limited to 'generic/tkTextBTree.c')
-rw-r--r--generic/tkTextBTree.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c
index 23aef2d..d4a6be1 100644
--- a/generic/tkTextBTree.c
+++ b/generic/tkTextBTree.c
@@ -140,10 +140,10 @@ int tkBTreeDebug = 0;
* Macros that determine how much space to allocate for new segments:
*/
-#define CSEG_SIZE(chars) ((unsigned) (Tk_Offset(TkTextSegment, body) \
- + 1 + (chars)))
-#define TSEG_SIZE ((unsigned) (Tk_Offset(TkTextSegment, body) \
- + sizeof(TkTextToggle)))
+#define CSEG_SIZE(chars) (offsetof(TkTextSegment, body) \
+ + 1 + (chars))
+#define TSEG_SIZE (offsetof(TkTextSegment, body) \
+ + sizeof(TkTextToggle))
/*
* Forward declarations for functions defined in this file: