summaryrefslogtreecommitdiffstats
path: root/tools/genStubs.tcl
diff options
context:
space:
mode:
authornijtmans <nijtmans>2011-01-19 14:04:32 (GMT)
committernijtmans <nijtmans>2011-01-19 14:04:32 (GMT)
commit0aacc9808d7002c1ed7a351d189fb25059c1b330 (patch)
treec7fc3047bcfd38346fbaba38402d173da0cd7ee7 /tools/genStubs.tcl
parent80a56f77a468841d49a8f4e04817cf36640cfd2b (diff)
downloadtcl-0aacc9808d7002c1ed7a351d189fb25059c1b330.zip
tcl-0aacc9808d7002c1ed7a351d189fb25059c1b330.tar.gz
tcl-0aacc9808d7002c1ed7a351d189fb25059c1b330.tar.bz2
Make sure to use CONST/VOID in stead of
const/void when appropriate. This allows to use const/void in the *.decls file always, genStubs will do the right thing.
Diffstat (limited to 'tools/genStubs.tcl')
-rw-r--r--tools/genStubs.tcl8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl
index 3e896a1..70e06b1 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.44 2010/09/15 07:33:56 nijtmans Exp $
+# RCS: @(#) $Id: genStubs.tcl,v 1.45 2011/01/19 14:04:32 nijtmans Exp $
package require Tcl 8.4
@@ -491,6 +491,9 @@ proc genStubs::makeDecl {name decl index} {
set sep ", "
}
append line ", ...)"
+ if {[lindex $args end] eq "{const char *} format"} {
+ append line " TCL_FORMAT_PRINTF(" [expr [llength $args] - 1] ", " [llength $args] ")"
+ }
}
default {
set sep "("
@@ -588,6 +591,9 @@ proc genStubs::makeSlot {name decl index} {
set sep ", "
}
append text ", ...)"
+ if {[lindex $args end] eq "{const char *} format"} {
+ append text " TCL_FORMAT_PRINTF(" [expr [llength $args] - 1] ", " [llength $args] ")"
+ }
}
default {
set sep "("