| 4903 | } |
| 4904 | |
| 4905 | void asCScriptEngine::CallGlobalFunction(void *param1, void *param2, asSSystemFunctionInterface *i, asCScriptFunction *s) const |
| 4906 | { |
| 4907 | if( i->callConv == ICC_CDECL ) |
| 4908 | { |
| 4909 | void (*f)(void *, void *) = (void (*)(void *, void *))(i->func); |
| 4910 | f(param1, param2); |
| 4911 | } |
| 4912 | else if( i->callConv == ICC_STDCALL ) |
| 4913 | { |
| 4914 | typedef void (STDCALL *func_t)(void *, void *); |
| 4915 | func_t f = (func_t)(i->func); |
| 4916 | f(param1, param2); |
| 4917 | } |
| 4918 | else |
| 4919 | { |
| 4920 | // We must guarantee the order of the arguments which is why we copy them to this |
| 4921 | // array. Otherwise the compiler may put them anywhere it likes, or even keep them |
| 4922 | // in the registers which causes problem. |
| 4923 | void *params[2] = {param1, param2}; |
| 4924 | |
| 4925 | asCGeneric gen(const_cast<asCScriptEngine*>(this), s, 0, (asDWORD*)¶ms); |
| 4926 | void (*f)(asIScriptGeneric *) = (void (*)(asIScriptGeneric *))(i->func); |
| 4927 | f(&gen); |
| 4928 | } |
| 4929 | } |
| 4930 | |
| 4931 | bool asCScriptEngine::CallGlobalFunctionRetBool(void *param1, void *param2, asSSystemFunctionInterface *i, asCScriptFunction *s) const |
| 4932 | { |
no outgoing calls
no test coverage detected