- 21 Sep, 2016 1 commit
-
-
Damien George authored
One can instead lookup __name__ in the modules dict to get the value.
-
- 06 Aug, 2016 1 commit
-
-
Paul Sokolovsky authored
This includes file and socket objects, backed by Unix file descriptor. This improves compatibility with stmhal's uselect (and convenience of use), though not completely: return value from poll.poll() is still raw file descriptor.
-
- 18 Jun, 2016 1 commit
-
-
Paul Sokolovsky authored
It's now used for more than just stream protocol (e.g. pin protocol), so don't use false names.
-
- 04 Apr, 2016 1 commit
-
-
Paul Sokolovsky authored
-
- 01 Mar, 2016 1 commit
-
-
Paul Sokolovsky authored
-
- 27 Jan, 2016 1 commit
-
-
Paul Sokolovsky authored
-
- 21 Jan, 2016 1 commit
-
-
Paul Sokolovsky authored
By reserving enough space for peer address.
-
- 11 Jan, 2016 4 commits
-
-
Dave Hylands authored
-
Damien George authored
The first argument to the type.make_new method is naturally a uPy type, and all uses of this argument cast it directly to a pointer to a type structure. So it makes sense to just have it a pointer to a type from the very beginning (and a const pointer at that). This patch makes such a change, and removes all unnecessary casting to/from mp_obj_t.
-
Damien George authored
With this patch the n_args parameter is changed type from mp_uint_t to size_t.
-
Damien George authored
This patch changes the type signature of .make_new and .call object method slots to use size_t for n_args and n_kw (was mp_uint_t. Makes code more efficient when mp_uint_t is larger than a machine word. Doesn't affect ports when size_t and mp_uint_t have the same size.
-
- 29 Nov, 2015 2 commits
-
-
Damien George authored
This allows the mp_obj_t type to be configured to something other than a pointer-sized primitive type. This patch also includes additional changes to allow the code to compile when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of mp_uint_t, and various casts.
-
Damien George authored
-
- 21 Nov, 2015 1 commit
-
-
Paul Sokolovsky authored
-
- 20 Nov, 2015 2 commits
-
-
Paul Sokolovsky authored
Return tuple of (address_family, net_addr, [port, [extra_data]]). net_addr is still raw network address as bytes object, but suitable for passing to inet_ntop() function. At the very least, sockaddr() will separate address family value from binary socket address (and currently, only AF_INET family is decoded).
-
Paul Sokolovsky authored
-
- 10 Oct, 2015 1 commit
-
-
Anmol Sarma authored
-
- 14 Jul, 2015 1 commit
-
-
Paul Sokolovsky authored
inet_pton supports both ipv4 and ipv6 addresses. Interface is also extensible for other address families, but underlying libc inet_pton() function isn't really extensible (e.g., it doesn't return length of binary address, i.e. it's really hardcoded to AF_INET and AF_INET6). But anyway, on Python side, we could extend it to support other addresses.
-
- 13 Jul, 2015 1 commit
-
-
Paul Sokolovsky authored
Required to implement UDP servers.
-
- 12 Jul, 2015 1 commit
-
-
Paul Sokolovsky authored
sendto() turns out to be mandatory function to work with UDP. It may seem that connect(addr) + send() would achieve the same effect, but what connect() appears to do is to set source address filter on a socket to its argument. Then everything falls apart: socket sends to a broad-/multi-cast address, but reply is sent from real peer address, which doesn't match filter set by connect(), so local socket never sees a reply.
-
- 10 Jul, 2015 1 commit
-
-
Paul Sokolovsky authored
Treating it as signed lead to buffer overflow for ports >= 32768.
-
- 09 Jul, 2015 1 commit
-
-
Paul Sokolovsky authored
This usually allows to get just a single address entry.
-
- 16 Apr, 2015 1 commit
-
-
Damien George authored
Previous to this patch the printing mechanism was a bit of a tangled mess. This patch attempts to consolidate printing into one interface. All (non-debug) printing now uses the mp_print* family of functions, mainly mp_printf. All these functions take an mp_print_t structure as their first argument, and this structure defines the printing backend through the "print_strn" function of said structure. Printing from the uPy core can reach the platform-defined print code via two paths: either through mp_sys_stdout_obj (defined pert port) in conjunction with mp_stream_write; or through the mp_plat_print structure which uses the MP_PLAT_PRINT_STRN macro to define how string are printed on the platform. The former is only used when MICROPY_PY_IO is defined. With this new scheme printing is generally more efficient (less layers to go through, less arguments to pass), and, given an mp_print_t* structure, one can call mp_print_str for efficiency instead of mp_printf("%s", ...). Code size is also reduced by around 200 bytes on Thumb2 archs.
-
- 20 Jan, 2015 1 commit
-
-
Damien George authored
See issue #699.
-
- 01 Jan, 2015 2 commits
-
-
Damien George authored
-
Damien George authored
Addresses issue #1022.
-
- 05 Dec, 2014 1 commit
-
-
Damien George authored
mp_obj_int_get_truncated is used as a "fast path" int accessor that doesn't check for overflow and returns the int truncated to the machine word size, ie mp_int_t. Use mp_obj_int_get_truncated to fix struct.pack when packing maximum word sized values. Addresses issues #779 and #998.
-
- 29 Nov, 2014 1 commit
-
-
Damien George authored
This is just a clean-up of the code. Generated code is exactly the same.
-
- 21 Oct, 2014 1 commit
-
-
stijn authored
This makes open() and _io.FileIO() more CPython compliant. The mode kwarg is fully iplemented. The encoding kwarg is allowed but not implemented; mainly to allow the tests to specify encoding for CPython, see #874
-
- 18 Oct, 2014 1 commit
-
-
Paul Sokolovsky authored
Also, usocket.readinto(). Known issue is that .readinto() should be available only for binary files, but micropython uses single method table for both binary and text files.
-
- 09 Oct, 2014 1 commit
-
-
Paul Sokolovsky authored
Per new conventions, we'd like to consistently use "u*" naming conventions for modules which don't offer complete CPython compatibility, while offer subset or similar API.
-
- 06 Sep, 2014 1 commit
-
-
Damien George authored
For the sake of older versions of gcc (and other compilers), don't use the #warning CPP directive, nor the -Wno-error=cpp option. Also, fix a strict alias warning in modffi.c for older compilers, and add a test for ffi module. Addresses issue #847.
-
- 29 Aug, 2014 1 commit
-
-
Damien George authored
Addressing issue #50, still some way to go yet.
-
- 10 Aug, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 31 Jul, 2014 1 commit
-
-
Damien George authored
Addresses issue #724.
-
- 27 Jul, 2014 1 commit
-
-
Damien George authored
-
- 03 Jul, 2014 1 commit
-
-
Damien George authored
See discussion in issue #50.
-
- 24 Jun, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 22 Jun, 2014 2 commits
-
-
Paul Sokolovsky authored
It sucks to workaround this on uPy side, but upgrading not upgradable embedded systems sucks even more.
-
Paul Sokolovsky authored
-