Damien George
afc5063539
py/unicode: Comment-out unused function unichar_isprint.
8 years ago
Alex March
69d9e7d27d
py/repl: Check for an identifier char after the keyword.
- As described in the #1850 .
- Add cmdline tests.
9 years ago
Dave Hylands
afaa66b657
py: Minor improvement to unichar_isxdigit
This drops the size of unicode_isxdigit from 0x1e + 0x02 filler to
0x14 bytes (so net code reduction of 12 bytes) and will make
unicode_is_xdigit perform slightly faster.
10 years ago
Dave Hylands
3ad94d6072
extmod: Add ubinascii.unhexlify
This also pulls out hex_digit from py/lexer.c and makes unichar_hex_digit
10 years ago
Damien George
4dea922610
py: Adjust some spaces in code style/format, purely for consistency.
10 years ago
Damien George
51dfcb4bb7
py: Move to guarded includes, everywhere in py/ core.
Addresses issue #1022 .
10 years ago
Damien George
5318cc028a
py: Tidy up a few function declarations.
10 years ago
Damien George
40f3c02682
Rename machine_(u)int_t to mp_(u)int_t.
See discussion in issue #50 .
11 years ago
Paul Sokolovsky
9e215fa4c2
py: Make unichar_charlen() accept/return machine_uint_t.
11 years ago
Damien George
e04a44e2f6
py: Small comments, name changes, use of machine_int_t.
11 years ago
Paul Sokolovsky
1044c3dfe6
unicode: Make get_char()/next_char()/charlen() be 8-bit compatible.
Based on config define.
11 years ago
Paul Sokolovsky
46d31e9ca9
unicode: Add utf8_ptr_to_index().
Useful when we have pointer to char inside string, but need to return char
index. (E.g. str.find()).
11 years ago
Chris Angelico
c88987c1af
py: Implement basic unicode functions.
11 years ago
Paul Sokolovsky
59c675a64c
py: Include mpconfig.h before all other includes.
It defines types used by all other headers.
Fixes #691 .
11 years ago
Paul Sokolovsky
b0bb458810
unicode: String API is const byte*.
We still have that char vs byte dichotomy, but majority of string operations
now use byte.
11 years ago
Damien George
c59af52e84
py: Rename some unichar functions for consistency.
11 years ago
Paul Sokolovsky
6913521911
objstr: Implement .lower() and .upper().
11 years ago
Damien George
04b9147e15
Add license header to (almost) all files.
Blanket wide to all .c and .h files. Some files originating from ST are
difficult to deal with (license wise) so it was left out of those.
Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
11 years ago
Damien George
175cecfa87
py: Make form-feed character a space (following C isspace).
Eg, in CPython stdlib, email/header.py has a form-feed character.
11 years ago
Paul Sokolovsky
520e2f58a5
Replace global "static" -> "STATIC", to allow "analysis builds". Part 2.
11 years ago
Paul Sokolovsky
0b7184dcb8
Implement octal and hex escapes in strings.
11 years ago
ian-v
5fd8fd2c16
Revert MP_BOOL, etc. and use <stdbool.h> instead
11 years ago
ian-v
7a16fadbf8
Co-exist with C++ (issue #85 )
11 years ago
Damien George
8cc96a35e5
Put unicode functions in unicode.c, and tidy their names.
11 years ago
Damien
429d71943d
Initial commit.
11 years ago