micropython/ports/cc3200/mods
Damien George cf31d384f1 py/stream: Switch stream close operation from method to ioctl.
This patch moves the implementation of stream closure from a dedicated
method to the ioctl of the stream protocol, for each type that implements
closing.  The benefits of this are:

1. Rounds out the stream ioctl function, which already includes flush,
   seek and poll (among other things).

2. Makes calling mp_stream_close() on an object slightly more efficient
   because it now no longer needs to lookup the close method and call it,
   rather it just delegates straight to the ioctl function (if it exists).

3. Reduces code size and allows future types that implement the stream
   protocol to be smaller because they don't need a dedicated close method.

Code size reduction is around 200 bytes smaller for x86 archs and around
30 bytes smaller for the bare-metal archs.
2018-04-10 13:41:32 +10:00
..
modmachine.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modnetwork.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modnetwork.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modubinascii.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modubinascii.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
moduhashlib.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
moduos.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
moduos.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modusocket.c py/stream: Switch stream close operation from method to ioctl. 2018-04-10 13:41:32 +10:00
modusocket.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modussl.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modutime.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modwipy.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modwlan.c py/objstr: Remove "make_qstr_if_not_already" arg from mp_obj_new_str. 2017-11-16 13:17:51 +11:00
modwlan.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
pybadc.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
pybadc.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
pybflash.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
pybflash.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
pybi2c.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
pybi2c.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
pybpin.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
pybpin.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
pybrtc.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
pybrtc.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
pybsd.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
pybsd.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
pybsleep.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
pybsleep.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
pybspi.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
pybspi.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
pybtimer.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
pybtimer.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
pybuart.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
pybuart.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
pybwdt.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
pybwdt.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00