MCPcopy Create free account
hub / github.com/coreutils/coreutils / tostring

Function tostring

src/expr.c:449–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447/* Coerce V to a string value (can't fail). */
448
449static void
450tostring (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

Callers 3

docolonFunction · 0.85
eval6Function · 0.85
eval2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected