Overview
Comment: | Fixed issues with several subcommands |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
05cac27666b3fcf33382babd659c5a19 |
User & Date: | rkeene on 2014-06-22 23:23:54 |
Other Links: | manifest | tags |
Context
2014-06-22
| ||
23:40 | Added a test using "curl" as a baseline for linking in external functions and libraries check-in: 2bc3e54e9e user: rkeene tags: trunk | |
23:23 | Fixed issues with several subcommands check-in: 05cac27666 user: rkeene tags: trunk | |
22:55 | Added the ability to search other paths for libraries and headers check-in: 07d1d92554 user: rkeene tags: trunk | |
Changes
Modified tcc4tcl.tcl from [33bc62956b] to [f5126bcd41].
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
...
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
uplevel 1 [list $callcmd $handle {*}$args]
}]
return $handle
}
proc _linktclcommand {cSymbol tclCommand} {
upvar #0 $handle state
lappend state(procs) $cSymbol $tclCommand
}
proc _add_include_path {args} {
upvar #0 $handle state
lappend state(add_inc_path) {*}$args
}
proc _add_library_path {args} {
upvar #0 $handle state
lappend state(add_lib_path) {*}$args
}
proc _add_library {args} {
upvar #0 $handle state
lappend state(add_lib) {*}$args
}
proc _cproc {handle name adefs rtype {body "#"}} {
upvar #0 $handle state
................................................................................
}
proc _tk {handle} {
upvar #0 $handle state
set state(tk) 1
}
proc _go {handle {outputOnly 0}} {
variable dir
upvar #0 $handle state
set code $state(code)
|
|
|
|
|
>
>
>
>
>
|
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
...
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
uplevel 1 [list $callcmd $handle {*}$args] }] return $handle } proc _linktclcommand {handle cSymbol tclCommand} { upvar #0 $handle state lappend state(procs) $cSymbol $tclCommand } proc _add_include_path {handle args} { upvar #0 $handle state lappend state(add_inc_path) {*}$args } proc _add_library_path {handle args} { upvar #0 $handle state lappend state(add_lib_path) {*}$args } proc _add_library {handle args} { upvar #0 $handle state lappend state(add_lib) {*}$args } proc _cproc {handle name adefs rtype {body "#"}} { upvar #0 $handle state ................................................................................ } proc _tk {handle} { upvar #0 $handle state set state(tk) 1 } proc _delete {handle} { rename $handle "" unset $handle } proc _go {handle {outputOnly 0}} { variable dir upvar #0 $handle state set code $state(code) |
Modified test.tcl from [790f1d50be] to [271d570bc1].
65 66 67 68 69 70 71 72 73 74 |
# New API set handle [tcc4tcl::new] $handle cproc test5 {int i} int { return(i + 42); } if {[$handle code] == ""} { error "[list $handle code] did not give code output" } $handle cproc test6 {int i} int { return(i + 42); } $handle go puts [test5 1] puts [test6 1] |
> |
65 66 67 68 69 70 71 72 73 74 75 |
# New API
set handle [tcc4tcl::new]
$handle cproc test5 {int i} int { return(i + 42); }
if {[$handle code] == ""} {
error "[list $handle code] did not give code output"
}
$handle cproc test6 {int i} int { return(i + 42); }
$handle add_library_path .
$handle go
puts [test5 1]
puts [test6 1]
|