~ubuntu-branches/ubuntu/utopic/critcl/utopic

« back to all changes in this revision

Viewing changes to test/c++indirect.tcl

  • Committer: Package Import Robot
  • Author(s): Andrew Shadura
  • Date: 2013-05-11 00:08:06 UTC
  • Revision ID: package-import@ubuntu.com-20130511000806-7hq1zc3fnn0gat79
Tags: upstream-3.1.9
ImportĀ upstreamĀ versionĀ 3.1.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package require critcl
 
2
 
 
3
critcl::config language c++
 
4
critcl::clibraries -lstdc++
 
5
 
 
6
critcl::ccode {
 
7
    class A {
 
8
      int value;
 
9
    public:
 
10
      A() : value (123) {}
 
11
      operator int() const { return value; }
 
12
    };
 
13
}
 
14
 
 
15
critcl::cproc tryplus {} int {
 
16
        A var;
 
17
        return var;
 
18
}
 
19
 
 
20
puts "tryplus = [tryplus]"