summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkGenStubs.tcl
diff options
context:
space:
mode:
authorJoe Mistachkin <joe@mistachkin.com>2014-11-11 22:23:34 (GMT)
committerJoe Mistachkin <joe@mistachkin.com>2014-11-11 22:23:34 (GMT)
commitb15c525eedc93a453dfea94482bc1198e27748fc (patch)
tree49a88f59bc168351fe802d8aa68da6d853b823aa /generic/ttk/ttkGenStubs.tcl
parent07f85cd3c1b4934fb746ea36516ba2944b4eea11 (diff)
parentee9722cf78769c35f57383613f570b6e797e74bf (diff)
downloadtk-b15c525eedc93a453dfea94482bc1198e27748fc.zip
tk-b15c525eedc93a453dfea94482bc1198e27748fc.tar.gz
tk-b15c525eedc93a453dfea94482bc1198e27748fc.tar.bz2
Merge updates from core 8.5 branch.
Diffstat (limited to 'generic/ttk/ttkGenStubs.tcl')
-rw-r--r--generic/ttk/ttkGenStubs.tcl28
1 files changed, 22 insertions, 6 deletions
diff --git a/generic/ttk/ttkGenStubs.tcl b/generic/ttk/ttkGenStubs.tcl
index 90dea25..3c8eb19 100644
--- a/generic/ttk/ttkGenStubs.tcl
+++ b/generic/ttk/ttkGenStubs.tcl
@@ -187,7 +187,6 @@ proc genStubs::declare {args} {
variable revision
incr revision
-
if {[llength $args] == 2} {
lassign $args index decl
set status current
@@ -214,7 +213,25 @@ proc genStubs::declare {args} {
if {$index > $stubs($curName,lastNum)} {
set stubs($curName,lastNum) $index
}
+ return
+}
+
+# genStubs::export --
+#
+# This function is used in the declarations file to declare a symbol
+# that is exported from the library but is not in the stubs table.
+#
+# Arguments:
+# decl The C function declaration, or {} for an undefined
+# entry.
+#
+# Results:
+# None.
+proc genStubs::export {args} {
+ if {[llength $args] != 1} {
+ puts stderr "wrong # args: export $args"
+ }
return
}
@@ -410,7 +427,6 @@ proc genStubs::parseArg {arg} {
proc genStubs::makeDecl {name decl index} {
variable scspec
-
lassign $decl rtype fname args
append text "/* $index */\n"
@@ -731,6 +747,8 @@ proc genStubs::emitHeader {name} {
append text "#define ${CAPName}_STUBS_EPOCH $epoch\n"
append text "#define ${CAPName}_STUBS_REVISION $revision\n"
+ append text "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
+
emitDeclarations $name text
if {[info exists hooks($name)]} {
@@ -752,8 +770,7 @@ proc genStubs::emitHeader {name} {
append text "} ${capName}Stubs;\n\n"
- append text "#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
- append text "extern const ${capName}Stubs *${name}StubsPtr;\n"
+ append text "extern const ${capName}Stubs *${name}StubsPtr;\n\n"
append text "#ifdef __cplusplus\n}\n#endif\n"
emitMacros $name text
@@ -778,10 +795,9 @@ proc genStubs::emitInit {name textVar} {
variable interfaces
variable epoch
variable revision
-
upvar $textVar text
- set root 1
+ set root 1
set capName [string toupper [string index $name 0]]
append capName [string range $name 1 end]
set CAPName [string toupper $name]