| 447 | /* Coerce V to a string value (can't fail). */ |
| 448 | |
| 449 | static void |
| 450 | tostring (VALUE *v) |
| 451 | { |
| 452 | switch (v->type) |
| 453 | { |
| 454 | case integer: |
| 455 | { |
| 456 | char *s = mpz_get_str (NULL, 10, v->u.i); |
| 457 | mpz_clear (v->u.i); |
| 458 | v->u.s = s; |
| 459 | v->type = string; |
| 460 | } |
| 461 | break; |
| 462 | case string: |
| 463 | break; |
| 464 | default: |
| 465 | unreachable (); |
| 466 | } |
| 467 | } |
| 468 | |
| 469 | /* Coerce V to an integer value. Return true on success, false on failure. */ |
| 470 |