79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
$handle delete
# External functions
if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)]} {
set handle [tcc4tcl::new]
$handle cwrap curl_version {} vstring
$handle add_library_path [::tcl::pkgconfig get libdir,runtime]
$handle add_library_path /usr/lib64
$handle add_library_path /usr/lib
$handle add_library_path /usr/lib32
$handle add_library curl
$handle go
puts [curl_version]
}
|
>
|
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
$handle delete
# External functions
if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)]} {
set handle [tcc4tcl::new]
$handle cwrap curl_version {} vstring
$handle add_library_path [::tcl::pkgconfig get libdir,runtime]
$handle add_library_path /usr/lib/x86_64-linux-gnu
$handle add_library_path /usr/lib64
$handle add_library_path /usr/lib
$handle add_library_path /usr/lib32
$handle add_library curl
$handle go
puts [curl_version]
}
|
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
## Currently doesn't work on Darwin
if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)] && $::tcl_platform(os) != "Darwin"} {
set tmpfile "/tmp/DELETEME_tcc4tcl_test_exec[expr rand()].so"
file delete $tmpfile
set handle [tcc4tcl::new $tmpfile "myPkg 0.1"]
$handle cproc ext_add {int a int b} long { return(a+b); }
$handle add_library_path [::tcl::pkgconfig get libdir,runtime]
$handle add_library_path /usr/lib64
$handle add_library_path /usr/lib
$handle add_library_path /usr/lib32
$handle add_library tclstub${::tcl_version}
$handle go
load $tmpfile myPkg
puts [ext_add 1 42]
|
>
|
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
## Currently doesn't work on Darwin
if {[info exists ::env(TCC4TCL_TEST_RUN_NATIVE)] && $::tcl_platform(os) != "Darwin"} {
set tmpfile "/tmp/DELETEME_tcc4tcl_test_exec[expr rand()].so"
file delete $tmpfile
set handle [tcc4tcl::new $tmpfile "myPkg 0.1"]
$handle cproc ext_add {int a int b} long { return(a+b); }
$handle add_library_path [::tcl::pkgconfig get libdir,runtime]
$handle add_library_path /usr/lib/x86_64-linux-gnu
$handle add_library_path /usr/lib64
$handle add_library_path /usr/lib
$handle add_library_path /usr/lib32
$handle add_library tclstub${::tcl_version}
$handle go
load $tmpfile myPkg
puts [ext_add 1 42]
|
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
curl_easy_setopt(handle, CURLOPT_URL, url);
curl_easy_perform(handle);
return(TCL_OK);
}
$handle add_include_path /usr/include
$handle add_library_path [::tcl::pkgconfig get libdir,runtime]
$handle add_library_path /usr/lib64
$handle add_library_path /usr/lib
$handle add_library_path /usr/lib32
$handle add_library curl
$handle go
curl_fetch http://rkeene.org/
|
>
|
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
curl_easy_setopt(handle, CURLOPT_URL, url);
curl_easy_perform(handle);
return(TCL_OK);
}
$handle add_include_path /usr/include
$handle add_library_path [::tcl::pkgconfig get libdir,runtime]
$handle add_library_path /usr/lib/x86_64-linux-gnu
$handle add_library_path /usr/lib64
$handle add_library_path /usr/lib
$handle add_library_path /usr/lib32
$handle add_library curl
$handle go
curl_fetch http://rkeene.org/
|