File: Testcb.java

package info (click to toggle)
camljava 0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 344 kB
  • sloc: ansic: 844; ml: 336; java: 302; makefile: 97
file content (13 lines) | stat: -rw-r--r-- 447 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
import fr.inria.caml.camljava.Callback;

class Testcb {
    private Callback cb;
    private static long _f = Callback.getCamlMethodID("f");
    private static long _g = Callback.getCamlMethodID("g");
    public Testcb(Callback c) { cb = c; }
    public void f()
    { Object[] args = { }; cb.callVoid(_f, args); }
    public int g(int x)
    { Object[] args = { new fr.inria.caml.camljava.Camlint(x) };
      return cb.callCamlint(_g, args); }
}