Foo(Foo *f) {
  delete f;
}
int Foo_x_get(Foo *f) {
  return f-&gt;x;
}
void Foo_x_set(Foo *f, int value) {
  f-&gt;x = value;
}
int Foo_spam(Foo *f, int arg1) {
  return f-&gt;spam(arg1);
}
</pre>
</div>

<p>
These wrappers are actually found in the Tcl extension module.  For example, you can certainly do this:
</p>

<div class="code">
<pre>
% load ./example.so
% set f [new_Foo]
% Foo_x_get $f
0
% Foo_spam $f 3
1
%
</pre>
</div>

<p>
However, in addition to this, the classname <tt>Foo</tt> is used as an ob