| 1 | // examples/hello translated by yaks | 
| 2 | |
| 3 | #include "mycpp/runtime.h" | 
| 4 | namespace hello { | 
| 5 | int main(List<BigStr*>* argv) { | 
| 6 | return 42; | 
| 7 | } | 
| 8 | } // namespace hello | 
| 9 | int main(int argc, char **argv) { | 
| 10 | mylib::InitCppOnly(); // Initializes gHeap | 
| 11 | |
| 12 | auto* args = Alloc<List<BigStr*>>(); | 
| 13 | for (int i = 0; i < argc; ++i) { | 
| 14 | args->append(StrFromC(argv[i])); | 
| 15 | } | 
| 16 | |
| 17 | int status = hello::main(args); | 
| 18 | |
| 19 | gHeap.ProcessExit(); | 
| 20 | |
| 21 | return status; | 
| 22 | } |