summaryrefslogtreecommitdiffstatshomepage
path: root/lib/utils/pyhelp.c
diff options
context:
space:
mode:
authorErik Moqvist <erik.moqvist@gmail.com>2016-10-16 16:40:56 +0200
committerDamien George <damien.p.george@gmail.com>2016-10-21 18:30:58 +1100
commitf64e806f50606902323c62cf7b479922724022b6 (patch)
treedc403c21023a00f9f374412e7ce21622819ac3aa /lib/utils/pyhelp.c
parent571e6f26dbd7e0e38441bc402f76d293303063b2 (diff)
downloadmicropython-f64e806f50606902323c62cf7b479922724022b6.tar.gz
micropython-f64e806f50606902323c62cf7b479922724022b6.zip
lib/utils/pyhelp.c: Use mp_printf() instead of printf()
This patch introduces MP_PYTHON_PRINTER for general use.
Diffstat (limited to 'lib/utils/pyhelp.c')
-rw-r--r--lib/utils/pyhelp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/utils/pyhelp.c b/lib/utils/pyhelp.c
index 5c0b2c57b7..30ff391c4b 100644
--- a/lib/utils/pyhelp.c
+++ b/lib/utils/pyhelp.c
@@ -29,11 +29,11 @@
#include "lib/utils/pyhelp.h"
STATIC void pyhelp_print_info_about_object(mp_obj_t name_o, mp_obj_t value) {
- printf(" ");
+ mp_printf(MP_PYTHON_PRINTER, " ");
mp_obj_print(name_o, PRINT_STR);
- printf(" -- ");
+ mp_printf(MP_PYTHON_PRINTER, " -- ");
mp_obj_print(value, PRINT_STR);
- printf("\n");
+ mp_printf(MP_PYTHON_PRINTER, "\n");
}
// Helper for 1-argument form of builtin help
@@ -57,9 +57,9 @@ STATIC void pyhelp_print_info_about_object(mp_obj_t name_o, mp_obj_t value) {
//
void pyhelp_print_obj(const mp_obj_t obj) {
// try to print something sensible about the given object
- printf("object ");
+ mp_printf(MP_PYTHON_PRINTER, "object ");
mp_obj_print(obj, PRINT_STR);
- printf(" is of type %s\n", mp_obj_get_type_str(obj));
+ mp_printf(MP_PYTHON_PRINTER, " is of type %s\n", mp_obj_get_type_str(obj));
mp_map_t *map = NULL;
if (MP_OBJ_IS_TYPE(obj, &mp_type_module)) {