diff options
author | nijtmans <nijtmans> | 2010-08-21 16:30:26 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-08-21 16:30:26 (GMT) |
commit | 23d66b6d7e39e2b189c6ca7c09d76c398d13171a (patch) | |
tree | c8b551461e0fb3e73294da1f8badf2f2b69d9bd3 /tools | |
parent | 2353628b42e71598ddcc606a3c51667a6cc4f199 (diff) | |
download | tcl-23d66b6d7e39e2b189c6ca7c09d76c398d13171a.zip tcl-23d66b6d7e39e2b189c6ca7c09d76c398d13171a.tar.gz tcl-23d66b6d7e39e2b189c6ca7c09d76c398d13171a.tar.bz2 |
[Patch 3034251]: Backport ttkGenStubs.tcl features to genStubs.tcl, partly:
Use void (*reserved$i)(void) = 0 instead of void *reserved$i = NULL for unused stub entries, in case pointer-to-function and pointer-to-object are different sizes.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/genStubs.tcl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index 7a2a8df..bb6449f 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.41 2010/08/19 04:26:05 nijtmans Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.42 2010/08/21 16:30:27 nijtmans Exp $ package require Tcl 8.4 @@ -137,6 +137,7 @@ proc genStubs::declare {args} { if {[llength $args] != 3} { puts stderr "wrong # args: declare $args" + return } lassign $args index platformList decl @@ -300,7 +301,7 @@ proc genStubs::addPlatformGuard {plat iftxt {eltxt {}}} { proc genStubs::emitSlots {name textVar} { upvar $textVar text - forAllStubs $name makeSlot 1 text {" void *reserved$i;\n"} + forAllStubs $name makeSlot 1 text {" void (*reserved$i)(void);\n"} return } @@ -988,10 +989,10 @@ proc genStubs::emitInit {name textVar} { if {[info exists hooks($name)]} { append text " &${name}StubHooks,\n" } else { - append text " NULL,\n" + append text " 0,\n" } - forAllStubs $name makeInit 1 text {" NULL, /* $i */\n"} + forAllStubs $name makeInit 1 text {" 0, /* $i */\n"} append text "\};\n" return |