summaryrefslogtreecommitdiffstats
path: root/tools/genStubs.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/genStubs.tcl')
-rw-r--r--tools/genStubs.tcl18
1 files changed, 17 insertions, 1 deletions
diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl
index 9f2c6ca..742aa46 100644
--- a/tools/genStubs.tcl
+++ b/tools/genStubs.tcl
@@ -199,6 +199,13 @@ proc genStubs::declare {args} {
set stubs($curName,$platform,lastNum) $index
}
}
+ if {$platformList eq "deprecated"} {
+ set stubs($curName,generic,$index) $decl
+ if {![info exists stubs($curName,generic,lastNum)] \
+ || ($index > $stubs($curName,generic,lastNum))} {
+ set stubs($curName,$platform,lastNum) $index
+ }
+ }
}
return
}
@@ -455,10 +462,16 @@ proc genStubs::parseArg {arg} {
proc genStubs::makeDecl {name decl index} {
variable scspec
+ variable stubs
+ variable libraryName
lassign $decl rtype fname args
append text "/* $index */\n"
+ if {[info exists stubs($name,deprecated,$index)]} {
+ set line "[string toupper $libraryName]_DEPRECATED $rtype"
+ } else {
set line "$scspec $rtype"
+ }
set count [expr {2 - ([string length $line] / 8)}]
append line [string range "\t\t\t" 0 $count]
set pad [expr {24 - [string length $line]}]
@@ -682,7 +695,10 @@ proc genStubs::forAllStubs {name slotProc onAll textVar
for {set i 0} {$i <= $lastNum} {incr i} {
set slots [array names stubs $name,*,$i]
set emit 0
- if {[info exists stubs($name,generic,$i)]} {
+ if {[info exists stubs($name,deprecated,$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:\
$name $i"