Browse Source

py/builtinhelp: Change signature of help text var from pointer to array.

As a pointer (const char *) it takes up an extra word of storage which is
in RAM.
pull/3316/head
Damien George 7 years ago
parent
commit
da8c4c2653
  1. 2
      ports/cc3200/misc/help.c
  2. 2
      ports/esp8266/help.c
  3. 2
      ports/stm32/help.c
  4. 2
      ports/teensy/help.c
  5. 2
      ports/zephyr/help.c
  6. 2
      py/builtin.h
  7. 2
      py/builtinhelp.c

2
ports/cc3200/misc/help.c

@ -27,6 +27,6 @@
#include "py/builtin.h" #include "py/builtin.h"
const char *cc3200_help_text = "Welcome to MicroPython!\n" const char cc3200_help_text[] = "Welcome to MicroPython!\n"
"For online help please visit http://micropython.org/help/.\n" "For online help please visit http://micropython.org/help/.\n"
"For further help on a specific object, type help(obj)\n"; "For further help on a specific object, type help(obj)\n";

2
ports/esp8266/help.c

@ -26,7 +26,7 @@
#include "py/builtin.h" #include "py/builtin.h"
const char *esp_help_text = const char esp_help_text[] =
"Welcome to MicroPython!\n" "Welcome to MicroPython!\n"
"\n" "\n"
"For online docs please visit http://docs.micropython.org/en/latest/esp8266/ .\n" "For online docs please visit http://docs.micropython.org/en/latest/esp8266/ .\n"

2
ports/stm32/help.c

@ -26,7 +26,7 @@
#include "py/builtin.h" #include "py/builtin.h"
const char *stm32_help_text = const char stm32_help_text[] =
"Welcome to MicroPython!\n" "Welcome to MicroPython!\n"
"\n" "\n"
"For online help please visit http://micropython.org/help/.\n" "For online help please visit http://micropython.org/help/.\n"

2
ports/teensy/help.c

@ -26,7 +26,7 @@
#include "py/builtin.h" #include "py/builtin.h"
const char *teensy_help_text = const char teensy_help_text[] =
"Welcome to MicroPython!\n" "Welcome to MicroPython!\n"
"\n" "\n"
"For online help please visit http://micropython.org/help/.\n" "For online help please visit http://micropython.org/help/.\n"

2
ports/zephyr/help.c

@ -26,7 +26,7 @@
#include "py/builtin.h" #include "py/builtin.h"
const char *zephyr_help_text = const char zephyr_help_text[] =
"Welcome to MicroPython!\n" "Welcome to MicroPython!\n"
"\n" "\n"
"Control commands:\n" "Control commands:\n"

2
py/builtin.h

@ -118,6 +118,6 @@ extern const mp_obj_module_t mp_module_webrepl;
extern const mp_obj_module_t mp_module_framebuf; extern const mp_obj_module_t mp_module_framebuf;
extern const mp_obj_module_t mp_module_btree; extern const mp_obj_module_t mp_module_btree;
extern const char *MICROPY_PY_BUILTINS_HELP_TEXT; extern const char MICROPY_PY_BUILTINS_HELP_TEXT[];
#endif // MICROPY_INCLUDED_PY_BUILTIN_H #endif // MICROPY_INCLUDED_PY_BUILTIN_H

2
py/builtinhelp.c

@ -32,7 +32,7 @@
#if MICROPY_PY_BUILTINS_HELP #if MICROPY_PY_BUILTINS_HELP
const char *mp_help_default_text = const char mp_help_default_text[] =
"Welcome to MicroPython!\n" "Welcome to MicroPython!\n"
"\n" "\n"
"For online docs please visit http://docs.micropython.org/\n" "For online docs please visit http://docs.micropython.org/\n"

Loading…
Cancel
Save