micropython/py
Jim Mussared 198311c780 py/stream: Add mp_stream___exit___obj that calls mp_stream_close.
There are enough places that implement __exit__ by forwarding directly to
mp_stream_close that this saves code size.

For the cases where __exit__ is a no-op, additionally make their
MP_STREAM_CLOSE ioctl handled as a no-op.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-21 18:49:03 +10:00
..
argcheck.c py: Remove the word "yet" from exception messages. 2022-12-06 13:34:52 +11:00
asmarm.c
asmarm.h
asmbase.c all: Fix spelling mistakes based on codespell check. 2023-04-27 18:03:06 +10:00
asmbase.h
asmthumb.c all: Fix spelling mistakes based on codespell check. 2023-04-27 18:03:06 +10:00
asmthumb.h
asmx64.c
asmx64.h
asmx86.c
asmx86.h
asmxtensa.c
asmxtensa.h
bc.c py/bc: Fix checking for duplicate **kwargs. 2022-11-28 11:23:22 +11:00
bc.h py: Pass in address to compiled module instead of returning it. 2022-12-08 12:27:23 +11:00
bc0.h
binary.c
binary.h
builtin.h py/makemoduledefs.py: Automatically declare delegation attr functions. 2023-06-14 19:03:46 +10:00
builtinevex.c py: Use nlr jump callbacks to optimise compile/execute functions. 2023-06-02 21:59:47 +10:00
builtinhelp.c py/objmodule: Add a table of built-in modules with delegation. 2023-06-08 17:54:24 +10:00
builtinimport.c py/builtinimport: Fix built-in imports when external import is disabled. 2023-07-13 14:56:33 +10:00
compile.c py/compile: Fix async for's stack handling of iterator expression. 2023-07-13 13:50:50 +10:00
compile.h py: Pass in address to compiled module instead of returning it. 2022-12-08 12:27:23 +11:00
dynruntime.h
dynruntime.mk
emit.h py/compile: Fix scope of assignment expression target in comprehensions. 2023-03-09 12:13:12 +11:00
emitbc.c all: Fix spelling mistakes based on codespell check. 2023-04-27 18:03:06 +10:00
emitcommon.c py/compile: Fix scope of assignment expression target in comprehensions. 2023-03-09 12:13:12 +11:00
emitglue.c
emitglue.h
emitinlinethumb.c
emitinlinextensa.c
emitnarm.c
emitnative.c all: Fix spelling mistakes based on codespell check. 2023-04-27 18:03:06 +10:00
emitnthumb.c
emitnx64.c
emitnx86.c
emitnxtensa.c
emitnxtensawin.c
formatfloat.c all: Fix spelling mistakes based on codespell check. 2023-04-27 18:03:06 +10:00
formatfloat.h
frozenmod.c
frozenmod.h
gc.c py/gc: Make improvements to MICROPY_GC_HOOK_LOOP. 2023-05-09 12:44:14 +10:00
gc.h py/gc: Make gc_dump_info/gc_dump_alloc_table take a printer as argument. 2023-03-10 10:58:10 +11:00
grammar.h
lexer.c py/lexer: Allow conversion specifiers in f-strings (e.g. !r). 2023-06-14 19:11:04 +10:00
lexer.h
make_root_pointers.py
makecompresseddata.py all: Fix spelling mistakes based on codespell check. 2023-04-27 18:03:06 +10:00
makemoduledefs.py py/makemoduledefs.py: Automatically declare delegation attr functions. 2023-06-14 19:03:46 +10:00
makeqstrdata.py top: Update Python formatting to black "2023 stable style". 2023-02-02 12:51:03 +11:00
makeqstrdefs.py py/objmodule: Add a table of built-in modules with delegation. 2023-06-08 17:54:24 +10:00
makeversionhdr.py py/makeversionhdr.py: Always add micro to version string even if it's 0. 2023-03-10 18:39:14 +11:00
malloc.c
map.c py/map: Clear value when re-using slot with ordered dictionaries. 2023-01-13 14:21:32 +11:00
misc.h py/misc: Remove use of bitfield from vstr_t. 2022-10-12 00:33:09 +11:00
mkenv.mk
mkrules.cmake py/mkrules.cmake: Force build mpversion.h and frozen_content.c. 2023-02-08 12:24:15 +11:00
mkrules.mk py/mkrules.mk: Allow $(AFLAGS) to set flags to $(AS). 2023-06-15 11:02:15 +10:00
modarray.c all: Use MP_REGISTER_EXTENSIBLE_MODULE for overrideable built-ins. 2023-06-08 17:54:21 +10:00
modbuiltins.c all: Fix spelling mistakes based on codespell check. 2023-04-27 18:03:06 +10:00
modcmath.c
modcollections.c all: Use MP_REGISTER_EXTENSIBLE_MODULE for overrideable built-ins. 2023-06-08 17:54:21 +10:00
moderrno.c all: Use MP_REGISTER_EXTENSIBLE_MODULE for overrideable built-ins. 2023-06-08 17:54:21 +10:00
modgc.c
modio.c all: Use MP_REGISTER_EXTENSIBLE_MODULE for overrideable built-ins. 2023-06-08 17:54:21 +10:00
modmath.c py/modmath: Fix two-argument math function domain check. 2023-02-24 15:55:12 +11:00
modmicropython.c py/gc: Make gc_dump_info/gc_dump_alloc_table take a printer as argument. 2023-03-10 10:58:10 +11:00
modstruct.c all: Use MP_REGISTER_EXTENSIBLE_MODULE for overrideable built-ins. 2023-06-08 17:54:21 +10:00
modsys.c py/makemoduledefs.py: Automatically declare delegation attr functions. 2023-06-14 19:03:46 +10:00
modthread.c
mpconfig.h all: Remove the zlib module. 2023-07-21 18:48:29 +10:00
mperrno.h all: Rename UMODULE to MODULE in preprocessor/Makefile vars. 2023-06-08 17:54:11 +10:00
mphal.h
mpprint.c
mpprint.h
mpstate.c
mpstate.h py/modsys: Allow sys.path to be assigned to. 2023-06-08 17:54:24 +10:00
mpthread.h
mpz.c
mpz.h
nativeglue.c
nativeglue.h
nlr.c py/nlr: Implement jump callbacks. 2023-06-02 21:50:57 +10:00
nlr.h py/nlr: Implement jump callbacks. 2023-06-02 21:50:57 +10:00
nlraarch64.c py/nlraarch64: Fix dangerous use of input register. 2023-06-14 17:43:44 +10:00
nlrmips.c py/nlrmips: Add native NLR support for MIPS architecture. 2022-11-15 17:09:49 +11:00
nlrpowerpc.c
nlrsetjmp.c py/nlrsetjmp: Use MP_NLR_JUMP_HEAD macro to simplify code. 2023-06-02 21:47:34 +10:00
nlrthumb.c
nlrx64.c
nlrx86.c
nlrxtensa.c
obj.c py/obj: Accept user types in mp_obj_get_int_maybe. 2023-06-01 14:18:54 +10:00
obj.h py/objmodule: Add a table of built-in modules with delegation. 2023-06-08 17:54:24 +10:00
objarray.c py/objarray: Disallow memoryview addition. 2023-05-19 13:33:54 +10:00
objarray.h py/objarray: Raise error on out-of-bound memoryview slice start. 2023-01-20 16:31:37 +11:00
objattrtuple.c
objbool.c all: Rename UMODULE to MODULE in preprocessor/Makefile vars. 2023-06-08 17:54:11 +10:00
objboundmeth.c
objcell.c
objclosure.c
objcomplex.c
objdeque.c
objdict.c all: Rename UMODULE to MODULE in preprocessor/Makefile vars. 2023-06-08 17:54:11 +10:00
objenumerate.c
objexcept.c all: Rename UMODULE to MODULE in preprocessor/Makefile vars. 2023-06-08 17:54:11 +10:00
objexcept.h
objfilter.c
objfloat.c
objfun.c py/obj: Remove mp_generic_unary_op(). 2023-05-19 12:04:44 +10:00
objfun.h
objgenerator.c py/obj: Remove mp_generic_unary_op(). 2023-05-19 12:04:44 +10:00
objgenerator.h
objgetitemiter.c
objint.c py/objint: Allow int() to parse anything with the buffer protocol. 2023-06-01 15:11:06 +10:00
objint.h
objint_longlong.c py: Change MP_UNARY_OP_INT to MP_UNARY_OP_INT_MAYBE. 2023-06-01 13:01:07 +10:00
objint_mpz.c py: Change MP_UNARY_OP_INT to MP_UNARY_OP_INT_MAYBE. 2023-06-01 13:01:07 +10:00
objlist.c all: Rename UMODULE to MODULE in preprocessor/Makefile vars. 2023-06-08 17:54:11 +10:00
objlist.h
objmap.c
objmodule.c py/makemoduledefs.py: Automatically declare delegation attr functions. 2023-06-14 19:03:46 +10:00
objmodule.h py/makemoduledefs.py: Automatically declare delegation attr functions. 2023-06-14 19:03:46 +10:00
objnamedtuple.c
objnamedtuple.h
objnone.c all: Rename UMODULE to MODULE in preprocessor/Makefile vars. 2023-06-08 17:54:11 +10:00
objobject.c
objpolyiter.c
objproperty.c
objrange.c
objreversed.c
objset.c
objsingleton.c py/obj: Remove mp_generic_unary_op(). 2023-05-19 12:04:44 +10:00
objslice.c py/objslice: Ensure slice is not hashable. 2023-05-19 12:06:06 +10:00
objstr.c all: Rename UMODULE to MODULE in preprocessor/Makefile vars. 2023-06-08 17:54:11 +10:00
objstr.h
objstringio.c py/stream: Add mp_stream___exit___obj that calls mp_stream_close. 2023-07-21 18:49:03 +10:00
objstringio.h
objstrunicode.c all: Rename UMODULE to MODULE in preprocessor/Makefile vars. 2023-06-08 17:54:11 +10:00
objtuple.c all: Rename UMODULE to MODULE in preprocessor/Makefile vars. 2023-06-08 17:54:11 +10:00
objtuple.h
objtype.c py: Change MP_UNARY_OP_INT to MP_UNARY_OP_INT_MAYBE. 2023-06-01 13:01:07 +10:00
objtype.h
objzip.c
opmethods.c
pairheap.c
pairheap.h
parse.c all: Rename UMODULE to MODULE in preprocessor/Makefile vars. 2023-06-08 17:54:11 +10:00
parse.h
parsenum.c py/parsenum: Fix typo in #endif comment. 2023-06-14 17:32:01 +10:00
parsenum.h
parsenumbase.c
parsenumbase.h
persistentcode.c py: Pass in address to compiled module instead of returning it. 2022-12-08 12:27:23 +11:00
persistentcode.h py: Pass in address to compiled module instead of returning it. 2022-12-08 12:27:23 +11:00
profile.c py/obj: Remove mp_generic_unary_op(). 2023-05-19 12:04:44 +10:00
profile.h
py.cmake all: Rename *umodule*.c to remove the "u" prefix. 2023-06-08 17:54:17 +10:00
py.mk all: Rename *umodule*.c to remove the "u" prefix. 2023-06-08 17:54:17 +10:00
pystack.c
pystack.h
qstr.c
qstr.h
qstrdefs.h
reader.c
reader.h
repl.c py/makemoduledefs.py: Add a way to register extensible built-in modules. 2023-06-08 17:54:21 +10:00
repl.h
ringbuf.c py/ringbuf: Implement put_bytes/get_bytes functions. 2023-05-01 16:47:03 +10:00
ringbuf.h py/ringbuf: Implement put_bytes/get_bytes functions. 2023-05-01 16:47:03 +10:00
runtime.c py/modsys: Allow sys.path to be assigned to. 2023-06-08 17:54:24 +10:00
runtime.h py/modsys: Allow sys.path to be assigned to. 2023-06-08 17:54:24 +10:00
runtime0.h py: Change MP_UNARY_OP_INT to MP_UNARY_OP_INT_MAYBE. 2023-06-01 13:01:07 +10:00
runtime_utils.c
scheduler.c py/scheduler: Implement VM abort flag and mp_sched_vm_abort(). 2023-03-21 18:08:57 +11:00
scope.c
scope.h all: Fix spelling mistakes based on codespell check. 2023-04-27 18:03:06 +10:00
sequence.c all: Fix spelling mistakes based on codespell check. 2023-04-27 18:03:06 +10:00
showbc.c
smallint.c
smallint.h
stackctrl.c py/stackctrl: Add gcc pragmas to ignore dangling-pointer warning. 2023-05-04 10:08:12 +10:00
stackctrl.h
stream.c py/stream: Add mp_stream___exit___obj that calls mp_stream_close. 2023-07-21 18:49:03 +10:00
stream.h py/stream: Add mp_stream___exit___obj that calls mp_stream_close. 2023-07-21 18:49:03 +10:00
unicode.c
unicode.h
usermod.cmake
vm.c py/scheduler: Implement VM abort flag and mp_sched_vm_abort(). 2023-03-21 18:08:57 +11:00
vmentrytable.h
vstr.c
warning.c