ipl/packs/loadfuncpp/examples/arglist.cpp
raw| 1 | |
| 2 | /* Example of a C++ extension to icon via loadfunc, |
| 3 | * without garbage collection difficulties. |
| 4 | * Type 'make <platform>' to build. |
| 5 | * For available <platform>s type 'make'. |
| 6 | * Carl Sturtivant, 2007/9/25 |
| 7 | */ |
| 8 | |
| 9 | #include "loadfuncpp.h" |
| 10 | |
| 11 | |
| 12 | extern "C" int iexample(int argc, value argv[]) { |
| 13 | safe x(argc, argv); //make the arguments into an Icon list |
| 14 | argv[0] = x; |
| 15 | return SUCCEEDED; |
| 16 | } |
| 17 | |
| 18 |