Skip to content

Commit

Permalink
- removed some debug puts
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMiR01 committed Jun 30, 2022
1 parent 66f3b2f commit 46a3cf8
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions tcc4tcl.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,10 @@ namespace eval tcc4tcl {

variable hasTK 0

puts "Plattform $::tcl_platform(os)-$::tcl_platform(pointerSize)"
#puts "Plattform $::tcl_platform(os)-$::tcl_platform(pointerSize)"
switch -glob -- $::tcl_platform(os)-$::tcl_platform(pointerSize) {
"Linux-*" {
puts "Linux"
#puts "Linux"
$handle add_include_path "${dir}/include/"
$handle add_include_path "/usr/include/"
$handle add_include_path "/usr/include/x86_64-linux-gnu"
Expand All @@ -504,7 +504,7 @@ namespace eval tcc4tcl {
set DLLEXPORT "__attribute__ ((visibility(\"default\")))"
}
"Windows*" {
puts "Windows"
#puts "Windows"
$handle add_include_path "${dir}/include/"
$handle add_include_path "${dir}/win32"
$handle add_include_path "${dir}/include/generic"
Expand Down Expand Up @@ -561,7 +561,7 @@ namespace eval tcc4tcl {
set code "#include <tcl.h>\n$code"

# Append additional generated code to support the output type
puts "Type is $state(type)";
#puts "Type is $state(type)";
switch -- $state(type) {
"memory" {
# No additional code needed
Expand Down Expand Up @@ -651,7 +651,6 @@ namespace eval tcc4tcl {
switch -- $state(type) {
"package" {
set tcc_type "dll"
puts "Adding ${dir}/lib/ $tclstub"
$handle add_library_path "${dir}/lib/"
$handle add_library $tclstub
$handle add_library $tkstub
Expand Down Expand Up @@ -686,7 +685,10 @@ namespace eval tcc4tcl {

switch -- $state(type) {
"memory" {
puts [tcc compile $code]
set r [tcc compile $code]
if {[string trim $r] ne ""} {
puts "Compile result:\n$r\n"
}

if {[info exists state(procs)] && [llength $state(procs)] > 0} {
foreach {procname cname_obj} $state(procs) {
Expand Down Expand Up @@ -723,7 +725,10 @@ namespace eval tcc4tcl {
}
}

puts [tcc compile $code]
set r [tcc compile $code]
if {[string trim $r] ne ""} {
puts "Compile result:\n$r\n"
}

foreach lib $state(add_lib) {
# this is necessary, since tcc tries to load lib alacarte, so no symbols will be resolved before smth is compolied
Expand Down Expand Up @@ -972,3 +977,4 @@ proc ::tcc4tcl::wrap {name adefs rtype {body "#"} {cname ""} {includePrototype 0

namespace eval tcc4tcl {namespace export cproc}
package provide tcc4tcl "0.30"

0 comments on commit 46a3cf8

Please sign in to comment.