From 0aacc9808d7002c1ed7a351d189fb25059c1b330 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 19 Jan 2011 14:04:32 +0000 Subject: 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. --- tools/genStubs.tcl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 "(" -- cgit v0.12