summaryrefslogtreecommitdiffstats
path: root/tools/genStubs.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-24 15:07:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-24 15:07:10 (GMT)
commit846e8f4c800a926b96d55217a217e1f27a7ce3c0 (patch)
treebd6e4842a35b9e10beff7166e0f47c38967c9c80 /tools/genStubs.tcl
parentc3353d5a645c33f35445ab3c510dfef988897dd2 (diff)
downloadtcl-846e8f4c800a926b96d55217a217e1f27a7ce3c0.zip
tcl-846e8f4c800a926b96d55217a217e1f27a7ce3c0.tar.gz
tcl-846e8f4c800a926b96d55217a217e1f27a7ce3c0.tar.bz2
Add support for libtommath's MP_WUR annotation to genStubs.tcl. Not enforced yet by the Tcl core, but extensions will encounter the libtommath warnings. Can be switched off.
Diffstat (limited to 'tools/genStubs.tcl')
-rw-r--r--tools/genStubs.tcl10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl
index 83ee6c7..7c9ee03 100644
--- a/tools/genStubs.tcl
+++ b/tools/genStubs.tcl
@@ -479,6 +479,8 @@ proc genStubs::makeDecl {name decl index} {
if {[info exists stubs($name,deprecated,$index)]} {
append text "[string toupper $libraryName]_DEPRECATED(\"$stubs($name,deprecated,$index)\")\n"
set line "$rtype"
+ } elseif {[string range $rtype end-5 end] eq "MP_WUR"} {
+ set line "$scspec [string trim [string range $rtype 0 end-6]]"
} else {
set line "$scspec $rtype"
}
@@ -548,6 +550,9 @@ proc genStubs::makeDecl {name decl index} {
append line ")"
}
}
+ if {[string range $rtype end-5 end] eq "MP_WUR"} {
+ append line " MP_WUR"
+ }
return "$text$line;\n"
}
@@ -611,6 +616,8 @@ proc genStubs::makeSlot {name decl index} {
append text [string trim [string range $rtype 0 end-9]] " (__stdcall *" $lfname ") "
} elseif {[string range $rtype 0 11] eq "TCL_NORETURN"} {
append text "TCL_NORETURN1 " [string trim [string range $rtype 12 end]] " (*" $lfname ") "
+ } elseif {[string range $rtype end-5 end] eq "MP_WUR"} {
+ append text [string trim [string range $rtype 0 end-6]] " (*" $lfname ") "
} else {
append text $rtype " (*" $lfname ") "
}
@@ -648,6 +655,9 @@ proc genStubs::makeSlot {name decl index} {
}
}
+ if {[string range $rtype end-5 end] eq "MP_WUR"} {
+ append text " MP_WUR"
+ }
append text "; /* $index */\n"
return $text
}