| Revision: | 1.2 |
| Committed: | Wed Oct 12 00:51:49 2005 UTC (21 years ago) by root |
| Content type: | text/plain |
| Branch: | MAIN |
| Changes since 1.1: | +8 -4 lines |
| Log Message: | *** empty log message *** |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | root | 1.1 | #include "cpjit.h" |
| 2 | |||
| 3 | #include <iostream> | ||
| 4 | |||
| 5 | using namespace cpjit; | ||
| 6 | using namespace std; | ||
| 7 | |||
| 8 | int main (void) | ||
| 9 | { | ||
| 10 | env e; | ||
| 11 | |||
| 12 | root | 1.2 | funbuild2<I32, PTR, U64> fb (e); |
| 13 | root | 1.1 | |
| 14 | root | 1.2 | fb << "return ((int *)a1)[0] + a2;"; |
| 15 | root | 1.1 | |
| 16 | root | 1.2 | fun2<I32, PTR, U64> &f = *fb.get (); |
| 17 | int i = 3; | ||
| 18 | cout << f (&i, 2) << endl; | ||
| 19 | |||
| 20 | fun2<I32, PTR, U64> f2 (e, f.id); | ||
| 21 | cout << f2 (&i, 2) << endl; | ||
| 22 | root | 1.1 | |
| 23 | return 0; | ||
| 24 | } |