assumption: either a or b is a string
| 436 | |
| 437 | // assumption: either a or b is a string |
| 438 | static SIValue SIValue_ConcatString(const SIValue a, const SIValue b) { |
| 439 | size_t bufferLen = 512; |
| 440 | size_t argument_len = 0; |
| 441 | char *buffer = rm_calloc(bufferLen, sizeof(char)); |
| 442 | SIValue args[2] = {a, b}; |
| 443 | SIValue_StringJoin(args, 2, "", &buffer, &bufferLen, &argument_len); |
| 444 | SIValue result = SI_DuplicateStringVal(buffer); |
| 445 | rm_free(buffer); |
| 446 | return result; |
| 447 | } |
| 448 | |
| 449 | // assumption: either a or b is a list - static function, the caller validate types |
| 450 | static SIValue SIValue_ConcatList(const SIValue a, const SIValue b) { |
no test coverage detected