summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-03 11:55:28 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-03 11:55:28 (GMT)
commit952d24142b646af79e23c6182cf4646295eec215 (patch)
tree876fd25342f6885be1eba0f216d2a7085f508dbd /tools
parentf3146e6826308cf112fccc9ac29ab18bca2a6071 (diff)
downloadtcl-952d24142b646af79e23c6182cf4646295eec215.zip
tcl-952d24142b646af79e23c6182cf4646295eec215.tar.gz
tcl-952d24142b646af79e23c6182cf4646295eec215.tar.bz2
cleanup tclInt.decls to have the same form as Tcl 8.5/8.6,
so a diff can show us the real signature differences Remove the TclpGetTZName implementation for Cygwin, from previous commit
Diffstat (limited to 'tools')
-rw-r--r--tools/genStubs.tcl16
1 files changed, 13 insertions, 3 deletions
diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl
index 5e86b69..c2b0b27 100644
--- a/tools/genStubs.tcl
+++ b/tools/genStubs.tcl
@@ -149,6 +149,8 @@ proc genStubs::declare {args} {
puts stderr "Duplicate entry: declare $args"
}
}
+ regsub -all const $decl CONST decl
+ regsub -all _XCONST $decl _Xconst decl
regsub -all "\[ \t\n\]+" [string trim $decl] " " decl
set decl [parseDecl $decl]
@@ -259,7 +261,7 @@ proc genStubs::addPlatformGuard {plat text} {
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;\n"}
return
}
@@ -360,6 +362,9 @@ proc genStubs::makeDecl {name decl index} {
lassign $decl rtype fname args
append text "/* $index */\n"
+ if {($rtype != "void") && ($rtype != "pascal void")} {
+ regsub -all void $rtype VOID rtype
+ }
set line "EXTERN $rtype"
set count [expr {2 - ([string length $line] / 8)}]
append line [string range "\t\t\t" 0 $count]
@@ -370,9 +375,10 @@ proc genStubs::makeDecl {name decl index} {
}
append line "$fname _ANSI_ARGS_("
+ regsub -all void $args VOID args
set arg1 [lindex $args 0]
switch -exact $arg1 {
- void {
+ VOID {
append line "(void)"
}
TCL_VARARGS {
@@ -529,11 +535,15 @@ proc genStubs::makeSlot {name decl index} {
append lfname [string range $fname 1 end]
set text " "
+ if {($rtype != "void") && ($rtype != "pascal void")} {
+ regsub -all void $rtype VOID rtype
+ }
append text $rtype " (*" $lfname ") _ANSI_ARGS_("
+ regsub -all void $args VOID args
set arg1 [lindex $args 0]
switch -exact $arg1 {
- void {
+ VOID {
append text "(void)"
}
TCL_VARARGS {