| 653 | } |
| 654 | |
| 655 | void* nullcGetGlobal(const char* name) |
| 656 | { |
| 657 | using namespace NULLC; |
| 658 | NULLC_CHECK_INITIALIZED(false); |
| 659 | |
| 660 | char* mem = (char*)nullcGetVariableData(NULL); |
| 661 | if(!linker || !name || !mem) |
| 662 | return NULL; |
| 663 | unsigned int hash = GetStringHash(name); |
| 664 | for(unsigned int i = 0; i < linker->exVariables.size(); i++) |
| 665 | { |
| 666 | if(linker->exVariables[i].nameHash == hash) |
| 667 | return mem + linker->exVariables[i].offset; |
| 668 | } |
| 669 | return NULL; |
| 670 | } |
| 671 | |
| 672 | unsigned int nullcFindFunctionIndex(const char* name) |
| 673 | { |