| 643 | |
| 644 | |
| 645 | void __scriptable_load_cppia(String inCode) |
| 646 | { |
| 647 | const unsigned char *code = (const unsigned char *)inCode.raw_ptr(); |
| 648 | int length = inCode.length; |
| 649 | #ifdef HX_SMART_STRINGS |
| 650 | if (inCode.isUTF16Encoded()) |
| 651 | { |
| 652 | code = (const unsigned char *)inCode.utf8_str(); |
| 653 | length = strlen( (const char *)code ); |
| 654 | } |
| 655 | #endif |
| 656 | |
| 657 | ::hx::CppiaLoadedModule module = hx::LoadCppia(code,length); |
| 658 | |
| 659 | module->boot(); |
| 660 | module->run(); |
| 661 | } |
| 662 |