/ Returns a pointer to the first integer argument found from the nth argument. */ /
| 1506 | /* Returns a pointer to the first integer argument found from the nth argument. */ |
| 1507 | /*********************************************************************************/ |
| 1508 | static int *GetIntArgPtr(PGLOBAL g, UDF_ARGS *args, uint& n) |
| 1509 | { |
| 1510 | int *x = NULL; |
| 1511 | |
| 1512 | for (uint i = n; i < args->arg_count; i++) |
| 1513 | if (args->arg_type[i] == INT_RESULT) { |
| 1514 | if (args->args[i]) { |
| 1515 | if ((x = (int*)PlgDBSubAlloc(g, NULL, sizeof(int)))) |
| 1516 | *x = (int)*(longlong*)args->args[i]; |
| 1517 | else |
| 1518 | PUSH_WARNING(g->Message); |
| 1519 | |
| 1520 | } // endif args |
| 1521 | |
| 1522 | n = i + 1; |
| 1523 | break; |
| 1524 | } // endif arg_type |
| 1525 | |
| 1526 | return x; |
| 1527 | } // end of GetIntArgPtr |
| 1528 | |
| 1529 | /*********************************************************************************/ |
| 1530 | /* Returns not 0 if the argument is a JSON item or file name. */ |
no test coverage detected