get arithmetic function
| 66 | |
| 67 | // get arithmetic function |
| 68 | AR_FuncDesc *AR_GetFunc |
| 69 | ( |
| 70 | const char *func_name, |
| 71 | bool include_internal |
| 72 | ) { |
| 73 | size_t len = strlen(func_name); |
| 74 | char lower_func_name[len + 1]; |
| 75 | str_tolower_ascii(func_name, lower_func_name, &len); |
| 76 | void *f = raxFind(__aeRegisteredFuncs, (unsigned char *)lower_func_name, len); |
| 77 | |
| 78 | if(f == raxNotFound) return NULL; |
| 79 | |
| 80 | AR_FuncDesc *func = (AR_FuncDesc*)f; |
| 81 | |
| 82 | if(func->internal && !include_internal) return NULL; |
| 83 | |
| 84 | return func; |
| 85 | } |
| 86 | |
| 87 | SIType AR_FuncDesc_RetType |
| 88 | ( |
no test coverage detected