From 49aba3d99eb7035ee260003ddc27728b26962d43 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 19 Oct 2018 15:51:36 +0000 Subject: Add support for "nostub" in genStubs.tcl. Not used by Tcl 8.6, but might be used by Tk 8.7 when linked against Tcl 8.6 --- tools/genStubs.tcl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index 830ba2b..f2f410f 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -198,6 +198,13 @@ proc genStubs::declare {args} { || ($index > $stubs($curName,generic,lastNum))} { set stubs($curName,generic,lastNum) $index } + } elseif {([lindex $platformList 0] eq "nostub")} { + set stubs($curName,nostub,$index) [lindex $platformList 1] + set stubs($curName,generic,$index) $decl + if {![info exists stubs($curName,generic,lastNum)] \ + || ($index > $stubs($curName,generic,lastNum))} { + set stubs($curName,generic,lastNum) $index + } } else { foreach platform $platformList { if {$decl ne ""} { @@ -593,6 +600,8 @@ proc genStubs::makeSlot {name decl index} { set text " " if {[info exists stubs($name,deprecated,$index)]} { append text "TCL_DEPRECATED_API(\"$stubs($name,deprecated,$index)\") " + } elseif {[info exists stubs($name,nostub,$index)]} { + append text "TCL_DEPRECATED_API(\"$stubs($name,nostub,$index)\") " } if {$args eq ""} { append text $rtype " *" $lfname "; /* $index */\n" @@ -705,6 +714,9 @@ proc genStubs::forAllStubs {name slotProc onAll textVar if {[info exists stubs($name,deprecated,$i)]} { append text [$slotProc $name $stubs($name,generic,$i) $i] set emit 1 + } elseif {[info exists stubs($name,nostub,$i)]} { + append text [$slotProc $name $stubs($name,generic,$i) $i] + set emit 1 } elseif {[info exists stubs($name,generic,$i)]} { if {[llength $slots] > 1} { puts stderr "conflicting generic and platform entries:\ -- cgit v0.12