Overview
Comment: | Added support for calling "add_file" (undocumented for now) |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
cd4a58d22bed7c29d241e0a739784082 |
User & Date: | rkeene on 2017-10-17 03:33:07 |
Other Links: | manifest | tags |
Context
2019-06-05
| ||
00:32 | Many improvements, especially for critcl compatibility check-in: c808df56cc user: rkeene tags: trunk | |
2017-10-17
| ||
03:33 | Added support for calling "add_file" (undocumented for now) check-in: cd4a58d22b user: rkeene tags: trunk | |
03:07 | When compiling with stubs enabled, also define Tcl_InitStubs() check-in: 765a81ec0f user: rkeene tags: trunk | |
Changes
Modified tcc4tcl.tcl from [895fa80a76] to [a663422b2a].
︙ | ︙ | |||
42 43 44 45 46 47 48 | if {$pkgName == ""} { set type "exe" } else { set type "package" } } | | | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | if {$pkgName == ""} { set type "exe" } else { set type "package" } } array set $handle [list code "" type $type filename $output package $pkgName add_inc_path "" add_lib_path "" add_lib "" add_macros "" add_files ""] proc $handle {cmd args} [string map [list @@HANDLE@@ $handle] { set handle {@@HANDLE@@} if {$cmd == "go"} { set args [list 0 {*}$args] } |
︙ | ︙ | |||
112 113 114 115 116 117 118 119 120 121 122 123 124 125 | } proc _add_library {handle args} { upvar #0 $handle state lappend state(add_lib) {*}$args } proc _cwrap {handle name adefs rtype} { upvar #0 $handle state set wrap [uplevel 1 [list ::tcc4tcl::wrap $name $adefs $rtype "#" "" 1]] set wrapped [lindex $wrap 0] | > > > > > > | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | } proc _add_library {handle args} { upvar #0 $handle state lappend state(add_lib) {*}$args } proc _add_file {handle args} { upvar #0 $handle state lappend state(add_files) {*}$args } proc _cwrap {handle name adefs rtype} { upvar #0 $handle state set wrap [uplevel 1 [list ::tcc4tcl::wrap $name $adefs $rtype "#" "" 1]] set wrapped [lindex $wrap 0] |
︙ | ︙ | |||
577 578 579 580 581 582 583 584 585 586 587 588 589 590 | foreach path $state(add_lib_path) { tcc add_library_path $path } foreach lib $state(add_lib) { tcc add_library $lib } switch -- $state(type) { "memory" { tcc compile $code if {[info exists state(procs)] && [llength $state(procs)] > 0} { foreach {procname cname_obj} $state(procs) { | > > > > | 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 | foreach path $state(add_lib_path) { tcc add_library_path $path } foreach lib $state(add_lib) { tcc add_library $lib } foreach addFile $state(add_files) { tcc add_file $addFile } switch -- $state(type) { "memory" { tcc compile $code if {[info exists state(procs)] && [llength $state(procs)] > 0} { foreach {procname cname_obj} $state(procs) { |
︙ | ︙ |