<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/misc.h, branch v1.9.2</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.2</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.2'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-07-31T08:35:40+00:00</updated>
<entry>
<title>all: Use the name MicroPython consistently in comments</title>
<updated>2017-07-31T08:35:40+00:00</updated>
<author>
<name>Alexander Steffen</name>
<email>devel.20.webmeister@spamgourmet.com</email>
</author>
<published>2017-06-30T07:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=55f33240f3d7051d4213629e92437a36f1fac50e'/>
<id>urn:sha1:55f33240f3d7051d4213629e92437a36f1fac50e</id>
<content type='text'>
There were several different spellings of MicroPython present in comments,
when there should be only one.
</content>
</entry>
<entry>
<title>all: Unify header guard usage.</title>
<updated>2017-07-18T01:57:39+00:00</updated>
<author>
<name>Alexander Steffen</name>
<email>devel.20.webmeister@spamgourmet.com</email>
</author>
<published>2017-06-29T21:14:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=299bc625864b9e624ed599c94a5f95870516139a'/>
<id>urn:sha1:299bc625864b9e624ed599c94a5f95870516139a</id>
<content type='text'>
The code conventions suggest using header guards, but do not define how
those should look like and instead point to existing files. However, not
all existing files follow the same scheme, sometimes omitting header guards
altogether, sometimes using non-standard names, making it easy to
accidentally pick a "wrong" example.

This commit ensures that all header files of the MicroPython project (that
were not simply copied from somewhere else) follow the same pattern, that
was already present in the majority of files, especially in the py folder.

The rules are as follows.

Naming convention:
* start with the words MICROPY_INCLUDED
* contain the full path to the file
* replace special characters with _

In addition, there are no empty lines before #ifndef, between #ifndef and
one empty line before #endif. #endif is followed by a comment containing
the name of the guard macro.

py/grammar.h cannot use header guards by design, since it has to be
included multiple times in a single C file. Several other files also do not
need header guards as they are only used internally and guaranteed to be
included only once:
* MICROPY_MPHALPORT_H
* mpconfigboard.h
* mpconfigport.h
* mpthreadport.h
* pin_defs_*.h
* qstrdefs*.h
</content>
</entry>
<entry>
<title>py/runtime: Mark m_malloc_fail() as NORETURN.</title>
<updated>2017-07-03T16:12:36+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-07-03T16:12:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2138258feaef3e65be8c85e19aaef57252672a64'/>
<id>urn:sha1:2138258feaef3e65be8c85e19aaef57252672a64</id>
<content type='text'>
</content>
</entry>
<entry>
<title>various: Spelling fixes</title>
<updated>2017-05-29T08:36:05+00:00</updated>
<author>
<name>Ville Skyttä</name>
<email>ville.skytta@iki.fi</email>
</author>
<published>2017-05-29T07:08:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ca16c3821053e5bf2b87aeb10007f73f31dc1eac'/>
<id>urn:sha1:ca16c3821053e5bf2b87aeb10007f73f31dc1eac</id>
<content type='text'>
</content>
</entry>
<entry>
<title>cc3200: Re-add support for UART REPL (MICROPY_STDIO_UART setting).</title>
<updated>2016-12-26T22:05:37+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-12-26T22:00:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=25f44c19f17085a09ad0f857c6ccc0d33d7c0344'/>
<id>urn:sha1:25f44c19f17085a09ad0f857c6ccc0d33d7c0344</id>
<content type='text'>
UART REPL support was lost in os.dupterm() refactorings, etc. As
os.dupterm() is there, implement UART REPL support at the high level -
if MICROPY_STDIO_UART is set, make default boot.py contain os.dupterm()
call for a UART. This means that changing MICROPY_STDIO_UART value will
also require erasing flash on a module to force boot.py re-creation.
</content>
</entry>
<entry>
<title>py/misc.h: Typo fix in comment.</title>
<updated>2016-12-26T22:05:30+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-12-26T21:55:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=cf96be60dc225603b14c97570596db4f482ef070'/>
<id>urn:sha1:cf96be60dc225603b14c97570596db4f482ef070</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/vstr: Combine vstr_new_size with vstr_new since they are rarely used.</title>
<updated>2016-10-14T05:46:34+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-10-14T05:46:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=824f5c5a32d740acad50d23b7ab1d69660dcf3ad'/>
<id>urn:sha1:824f5c5a32d740acad50d23b7ab1d69660dcf3ad</id>
<content type='text'>
Now there is just one function to allocate a new vstr, namely vstr_new
(in addition to vstr_init etc).  The caller of this function should know
what initial size to allocate for the buffer, or at least have some policy
or config option, instead of leaving it to a default (as it was before).
</content>
</entry>
<entry>
<title>py/vstr: Remove vstr.had_error flag and inline basic vstr functions.</title>
<updated>2016-09-19T02:28:55+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-09-19T01:17:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5da0d29d3cefa6a3cac52e0db96e9ede820d6a51'/>
<id>urn:sha1:5da0d29d3cefa6a3cac52e0db96e9ede820d6a51</id>
<content type='text'>
The vstr.had_error flag was a relic from the very early days which assumed
that the malloc functions (eg m_new, m_renew) returned NULL if they failed
to allocate.  But that's no longer the case: these functions will raise an
exception if they fail.

Since it was impossible for had_error to be set, this patch introduces no
change in behaviour.

An alternative option would be to change the malloc calls to the _maybe
variants, which return NULL instead of raising, but then a lot of code
will need to explicitly check if the vstr had an error and raise if it
did.

The code-size savings for this patch are, in bytes: bare-arm:188,
minimal:456, unix(NDEBUG,x86-64):368, stmhal:228, esp8266:360.
</content>
</entry>
<entry>
<title>py/repl: Check for an identifier char after the keyword.</title>
<updated>2016-02-17T08:56:15+00:00</updated>
<author>
<name>Alex March</name>
<email>alex.march.dev@gmail.com</email>
</author>
<published>2016-02-16T13:36:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=69d9e7d27d62d54c0625d4181c80478b0313384d'/>
<id>urn:sha1:69d9e7d27d62d54c0625d4181c80478b0313384d</id>
<content type='text'>
- As described in the #1850.
- Add cmdline tests.
</content>
</entry>
<entry>
<title>py/misc.h: Include stdint.h only once (unconditionally at the top).</title>
<updated>2015-12-08T00:23:58+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-12-08T00:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=946f870e3c1a9537bd09036d2d3a655275f23d5a'/>
<id>urn:sha1:946f870e3c1a9537bd09036d2d3a655275f23d5a</id>
<content type='text'>
</content>
</entry>
</feed>
