From c06763a0207dde7f2060f7b1670a0b99298a01f8 Mon Sep 17 00:00:00 2001 From: John R. Lenton Date: Tue, 7 Jan 2014 17:29:16 +0000 Subject: This implements a better (more python-conformant) list.sort. It's not really about that, though; it's about me figuring out a sane way forward for keyword-argument functions (and function metadata). But it's useful as is, and shouldn't break any existing code, so here you have it; I'm going to park it in my mind for a bit while sorting out the rest of the dict branch. --- py/objmodule.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'py/objmodule.c') diff --git a/py/objmodule.c b/py/objmodule.c index 2d6f9555e..df49ec670 100644 --- a/py/objmodule.c +++ b/py/objmodule.c @@ -22,15 +22,9 @@ void module_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_ } const mp_obj_type_t module_type = { - { &mp_const_type }, - "module", - module_print, // print - NULL, // make_new - NULL, // call_n - NULL, // unary_op - NULL, // binary_op - NULL, // getiter - NULL, // iternext + .base = { &mp_const_type }, + .name = "module", + .print = module_print, .methods = {{NULL, NULL},}, }; -- cgit v1.2.3