Diff

Differences From Artifact [cf0138864c]:

To Artifact [e2e01fc434]:


13
14
15
16
17
18
19













20
21
22
23
24
25







}

# This should work
tcc4tcl::cproc test3 {int i} int { return(i+42); }

# Multiple arguments
tcc4tcl::cproc add {int a int b} int { return(a+b); }














puts [test 1]
puts [test1 1]
puts [test3 1]
puts [::bob::test1 1]
puts [add [test 1] 1]














>
>
>
>
>
>
>
>
>
>
>
>
>






>
>
>
>
>
>
>
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
}

# This should work
tcc4tcl::cproc test3 {int i} int { return(i+42); }

# Multiple arguments
tcc4tcl::cproc add {int a int b} int { return(a+b); }

# Add external functions
tcc4tcl::cproc mkdir {char* dir} ok {
	int rv;

	rv = mkdir(dir);
	if (rv == 0) {
		return(TCL_OK);
	};

	return(TCL_ERROR);
} [list mkdir]


puts [test 1]
puts [test1 1]
puts [test3 1]
puts [::bob::test1 1]
puts [add [test 1] 1]

catch {
	puts [mkdir "/"]
} err
if {$err != ""} {
	error "\[mkdir\] did not return the expected error"
}