py: Add MICROPY_PY_BUILTINS_FILTER, disable for minimal ports.

Saves 320 bytes on x86.
This commit is contained in:
Paul Sokolovsky
2015-08-20 01:01:56 +03:00
parent 7f70b60f4d
commit 22ff397fb1
6 changed files with 15 additions and 0 deletions

View File

@@ -26,6 +26,8 @@
#include "py/runtime.h"
#if MICROPY_PY_BUILTINS_FILTER
typedef struct _mp_obj_filter_t {
mp_obj_base_t base;
mp_obj_t fun;
@@ -66,3 +68,5 @@ const mp_obj_type_t mp_type_filter = {
.getiter = mp_identity,
.iternext = filter_iternext,
};
#endif // MICROPY_PY_BUILTINS_FILTER