-
- Downloads
py: Change vstr so that it doesn't null terminate buffer by default.
This cleans up vstr so that it's a pure "variable buffer", and the user can decide whether they need to add a terminating null byte. In most places where vstr is used, the vstr did not need to be null terminated and so this patch saves code size, a tiny bit of RAM, and makes vstr usage more efficient. When null termination is needed it must be done explicitly using vstr_null_terminate.
Showing
- extmod/modujson.c 1 addition, 3 deletionsextmod/modujson.c
- lib/mp-readline/readline.c 1 addition, 0 deletionslib/mp-readline/readline.c
- py/builtinimport.c 7 additions, 3 deletionspy/builtinimport.c
- py/compile.c 3 additions, 3 deletionspy/compile.c
- py/emit.h 1 addition, 1 deletionpy/emit.h
- py/emitcpy.c 3 additions, 3 deletionspy/emitcpy.c
- py/misc.h 1 addition, 0 deletionspy/misc.h
- py/objstr.c 4 additions, 3 deletionspy/objstr.c
- py/stream.c 9 additions, 12 deletionspy/stream.c
- py/vstr.c 25 additions, 33 deletionspy/vstr.c
- stmhal/input.c 1 addition, 3 deletionsstmhal/input.c
- stmhal/modusocket.c 0 additions, 2 deletionsstmhal/modusocket.c
- stmhal/pyexec.c 10 additions, 4 deletionsstmhal/pyexec.c
- teensy/main.c 1 addition, 0 deletionsteensy/main.c
Loading
Please register or sign in to comment