Skip to content
Snippets Groups Projects
Select Git revision
  • 8721087661ea607ea68d45b4e518e53607cadbd3
  • wip-bootstrap default
  • dualcore
  • ch3/leds
  • ch3/time
  • master
6 results

objint.c

Blame
  • user avatar
    Damien George authored
    With the implementation of proper string formatting, code to print a
    small int was delegated to mpz_as_str_inpl (after first converting the
    small int to an mpz using stack memory).  But mpz_as_str_inpl allocates
    heap memory to do the conversion, so small ints needed heap memory just
    to be printed.
    
    This fix has a separate function to print small ints, which does not
    allocate heap, and allocates less stack.
    
    String formatting, printf and pfenv are now large beasts, with some
    semi-duplicated code.
    88d7bba9
    History
    objint.c 9.87 KiB