diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-10-24 15:07:10 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-10-24 15:07:10 (GMT) |
commit | 3cb4b841e6d7033e00d194ac949151a32135b37e (patch) | |
tree | bd6e4842a35b9e10beff7166e0f47c38967c9c80 /tools | |
parent | 93bbcb5679af7338995fa47ea14198c32d90958d (diff) | |
download | tcl-3cb4b841e6d7033e00d194ac949151a32135b37e.zip tcl-3cb4b841e6d7033e00d194ac949151a32135b37e.tar.gz tcl-3cb4b841e6d7033e00d194ac949151a32135b37e.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')
-rw-r--r-- | tools/genStubs.tcl | 10 |
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 } |