| 1 | // examples/pea_hello translated by pea_main
|
| 2 |
|
| 3 | // BEGIN mycpp output
|
| 4 |
|
| 5 | #include "mycpp/runtime.h"
|
| 6 |
|
| 7 | namespace pea_hello { // forward declare
|
| 8 | }
|
| 9 |
|
| 10 |
|
| 11 | namespace pea_hello { // declare
|
| 12 |
|
| 13 | int main(List<BigStr*>* argv);
|
| 14 |
|
| 15 | } // declare namespace pea_hello
|
| 16 |
|
| 17 | namespace pea_hello { // define
|
| 18 |
|
| 19 |
|
| 20 | int main(List<BigStr*>* argv) {
|
| 21 | StackRoot _root0(&argv);
|
| 22 |
|
| 23 | return 42;
|
| 24 | }
|
| 25 |
|
| 26 | } // define namespace pea_hello
|
| 27 |
|
| 28 | int main(int argc, char **argv) {
|
| 29 | mylib::InitCppOnly(); // Initializes gHeap
|
| 30 |
|
| 31 | auto* args = Alloc<List<BigStr*>>();
|
| 32 | for (int i = 0; i < argc; ++i) {
|
| 33 | args->append(StrFromC(argv[i]));
|
| 34 | }
|
| 35 |
|
| 36 | int status = pea_hello::main(args);
|
| 37 |
|
| 38 | gHeap.ProcessExit();
|
| 39 |
|
| 40 | return status;
|
| 41 | }
|