| 360 | #endif |
| 361 | |
| 362 | static void add_members(struct param **params, |
| 363 | char **obj, |
| 364 | char **arr, unsigned int **ints) |
| 365 | { |
| 366 | for (int i = 0; i < tal_count(ints); ++i) { |
| 367 | const char *name = tal_fmt(*params, "%i", i); |
| 368 | if (i != 0) { |
| 369 | tal_append_fmt(obj, ", "); |
| 370 | tal_append_fmt(arr, ", "); |
| 371 | } |
| 372 | tal_append_fmt(obj, "\"%i\" : %i", i, i); |
| 373 | tal_append_fmt(arr, "%i", i); |
| 374 | param_add(params, name, true, |
| 375 | typesafe_cb_preargs(struct command_result *, void **, |
| 376 | param_number, |
| 377 | &ints[i], |
| 378 | struct command *, |
| 379 | const char *, |
| 380 | const char *, |
| 381 | const jsmntok_t *), |
| 382 | &ints[i]); |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | /* |
| 387 | * A roundabout way of initializing an array of ints to: |
no test coverage detected