summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/modure.c
Commit message (Collapse)AuthorAge
* all: Raise exceptions via mp_raise_XXXJavier Candeira2017-08-13
| | | | | | | | - Changed: ValueError, TypeError, NotImplementedError - OSError invocations unchanged, because the corresponding utility function takes ints, not strings like the long form invocation. - OverflowError, IndexError and RuntimeError etc. not changed for now until we decide whether to add new utility functions.
* all: Use the name MicroPython consistently in commentsAlexander Steffen2017-07-31
| | | | | There were several different spellings of MicroPython present in comments, when there should be only one.
* extmod/modure: If input string is bytes, return bytes results too.Paul Sokolovsky2017-07-01
| | | | | | This applies to match.group() and split(). For ARM Thumb2, this increased code size by 12 bytes.
* extmod: Update for changes to mp_obj_str_get_data.Damien George2017-03-29
|
* all: Remove 'name' member from mp_obj_module_t struct.Damien George2016-09-22
| | | | One can instead lookup __name__ in the modules dict to get the value.
* extmod/modure: re_exec() renamed to ure_exec() due to collison in 4.3BSD.Tom Sparks2016-04-08
| | | | Addresses issue #1972.
* py: Change type signature of builtin funs that take variable or kw args.Damien George2016-01-11
| | | | | With this patch the n_args parameter is changed type from mp_uint_t to size_t.
* py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR.Damien George2015-11-29
| | | | | | | | | 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.
* py: Add MP_ROM_* macros and mp_rom_* types and use them.Damien George2015-11-29
|
* extmod/modure: Use correct integer type for n_args argument.Damien George2015-11-23
|
* extmod/modure: Make sure that errors in regexps are caught early.Paul Sokolovsky2015-11-01
|
* py: Add mp_obj_get_int_truncated and use it where appropriate.Damien George2015-05-12
| | | | | | 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.
* py: Overhaul and simplify printf/pfenv mechanism.Damien George2015-04-16
| | | | | | | | | | | | | | | | | | | | | | 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.
* extmod/ure: Fix msvc warning resulting from memset on const char ** pointerstijn2015-03-17
|
* extmod/ure: Correctly return None when a group has no match.Damien George2015-03-04
| | | | See issue #1122.
* extmod/modure: Make num_matches store actual number of matches.Damien George2015-02-18
|
* py, unix: Allow to compile with -Wunused-parameter.Damien George2015-01-20
| | | | See issue #699.
* extmod: Prefix py/ for includes from py core directory.Damien George2015-01-01
|
* py: Make functions static where appropriate.Damien George2014-12-10
|
* py: Rename mp_obj_int_get to mp_obj_int_get_truncated; fix struct.pack.Damien George2014-12-05
| | | | | | | | | | | 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.
* Use MP_DEFINE_CONST_DICT macro to define module dicts.Damien George2014-11-29
| | | | | This is just a clean-up of the code. Generated code is exactly the same.
* windows: Update config with latest featuresstijn2014-11-21
| | | | | - update mpconfigport.h to reflect latest unix version - fix compilation error in modure due to msvc not allowing dynamic arrays
* modure: Update to re1.5 v0.6, support for char sets/classes ([a-c]).Paul Sokolovsky2014-10-15
|
* modure: Make sure that re1.5 compiled in only of modure itself is enabled.Paul Sokolovsky2014-10-12
| | | | This is achieved by including re1.5 *.c files straight from modure.c .
* modure: Initial module, using re1.5 (which is based on re1 codebase).Paul Sokolovsky2014-10-11
https://github.com/pfalcon/re1.5