<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/stmhal/modusocket.c, branch cross</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=cross</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=cross'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-06-18T15:44:57+00:00</updated>
<entry>
<title>all: Rename mp_obj_type_t::stream_p to protocol.</title>
<updated>2016-06-18T15:44:57+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-06-18T15:19:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=07209f8592f15435d6abbccaad5347cea2c7722e'/>
<id>urn:sha1:07209f8592f15435d6abbccaad5347cea2c7722e</id>
<content type='text'>
It's now used for more than just stream protocol (e.g. pin protocol), so
don't use false names.
</content>
</entry>
<entry>
<title>stmhal: Convert to use internal errno symbols; enable uerrno module.</title>
<updated>2016-05-10T22:30:39+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-05-10T22:22:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5ab98d5c41bffa799a551a2731d904cab346898e'/>
<id>urn:sha1:5ab98d5c41bffa799a551a2731d904cab346898e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>extmod, stmhal: Fix typo of macro that detects if float is enabled.</title>
<updated>2016-04-26T11:47:24+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-04-26T11:47:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a63542387d1689f05bb102eef83baa2235e6d1e6'/>
<id>urn:sha1:a63542387d1689f05bb102eef83baa2235e6d1e6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.</title>
<updated>2016-01-11T00:49:27+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-03T15:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5b3f0b7f39bd67cc9182993c288f09f67a0890df'/>
<id>urn:sha1:5b3f0b7f39bd67cc9182993c288f09f67a0890df</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>py: Add mp_obj_get_int_truncated and use it where appropriate.</title>
<updated>2015-05-12T22:05:53+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-05-12T22:05:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c50772d19fe2804a6d0258f89dd9967d3b516fd3'/>
<id>urn:sha1:c50772d19fe2804a6d0258f89dd9967d3b516fd3</id>
<content type='text'>
mp_obj_get_int_truncated will raise a TypeError if the argument is not
an integral type.  Use mp_obj_int_get_truncated only when you know the
argument is a small or big int.
</content>
</entry>
<entry>
<title>lib: Move some common mod_network_* functions to lib/netutils.</title>
<updated>2015-05-04T10:48:40+00:00</updated>
<author>
<name>Josef Gajdusek</name>
<email>atx@atx.name</email>
</author>
<published>2015-05-03T18:26:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=04ee5983feadc6945e324eb54cd9e7f8c1d6aa8c'/>
<id>urn:sha1:04ee5983feadc6945e324eb54cd9e7f8c1d6aa8c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Change vstr so that it doesn't null terminate buffer by default.</title>
<updated>2015-01-28T23:43:01+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-28T23:43:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0d3cb6726ddc1bab9fdd11a0aaa259fb436da4b2'/>
<id>urn:sha1:0d3cb6726ddc1bab9fdd11a0aaa259fb436da4b2</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>stmhal: Bug fix for usocket's accept and setsockopt methods.</title>
<updated>2015-01-24T15:07:50+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-24T15:07:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=23342c09ff9e7d5ead4905a4692e9646b4bbc2eb'/>
<id>urn:sha1:23342c09ff9e7d5ead4905a4692e9646b4bbc2eb</id>
<content type='text'>
accept might raise an exception, in which case the new socket is not
fully created.  It has a finaliser so will run close() method when GC'd.
Before this patch close would try to close an invalid socket.  Now
fixed.

setsockopt took address of stack value which became out of scope.  Now
fixed.
</content>
</entry>
<entry>
<title>stmhal: Put mod_network_nic_list in global root-pointer state.</title>
<updated>2015-01-22T00:16:41+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-22T00:16:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=8b77e3dd2fd3005bc67bb59a701c6ea2422bf928'/>
<id>urn:sha1:8b77e3dd2fd3005bc67bb59a701c6ea2422bf928</id>
<content type='text'>
It needs to be scanned by GC.  Thanks to Daniel Campora.
</content>
</entry>
<entry>
<title>py: Remove mp_obj_str_builder and use vstr instead.</title>
<updated>2015-01-21T23:18:02+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-21T22:48:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=05005f679e00241e15a87751d89327f2c4630cb6'/>
<id>urn:sha1:05005f679e00241e15a87751d89327f2c4630cb6</id>
<content type='text'>
With this patch str/bytes construction is streamlined.  Always use a
vstr to build a str/bytes object.  If the size is known beforehand then
use vstr_init_len to allocate only required memory.  Otherwise use
vstr_init and the vstr will grow as needed.  Then use
mp_obj_new_str_from_vstr to create a str/bytes object using the vstr
memory.

Saves code ROM: 68 bytes on stmhal, 108 bytes on bare-arm, and 336 bytes
on unix x64.
</content>
</entry>
</feed>
