aboutsummaryrefslogtreecommitdiff
path: root/py/pfenv.h
AgeCommit message (Collapse)Author
2014-04-08py: Reinstate old pfenv_print_int function for stmhal's printf.Damien George
2014-04-08py: Rename pfenv_print_int to pfenv_print_mp_int, and add back former.Damien George
stmhal relies on pfenv_* to implement its printf. Thus, it needs a pfenv_print_int which prints a proper 32-bit integer. With latest change to pfenv, this function became one that took mp_obj_t, and extracted the integer value from that object. To fix temporarily, pfenv_print_int has been renamed to pfenv_print_mp_int (to indicate it takes a mp_obj_t for the int), and pfenv_print_int has been added (which takes a normal C int). Currently, pfenv_print_int proxies to pfenv_print_mp_int, but this means it looses the MSB. Need to find a way to fix this, but the only way I can think of will duplicate lots of code.
2014-04-07Add string formatting support for longlong and mpz.Dave Hylands
2014-04-05Change pfenv_print_int to take machine_uint_t rather than unsinged inDave Hylands
With this change, the following works: >>> print('%#x' % 0x1234567890abcdef) 0x1234567890abcdef
2014-04-01Enhance str.format supportDave Hylands
This adds support for almost everything (the comma isn't currently supported). The "unspecified" type with floats also doesn't behave exactly like python. Tested under unix with float and double Spot tested on stmhal