diff options
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r-- | Objects/dictobject.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 8f3d3a6..51f0018 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -880,7 +880,20 @@ mapping_has_key(mp, args) return newintobject(ok); } +static object * +mapping_clear(mp, args) + register mappingobject *mp; + object *args; +{ + if (!getnoarg(args)) + return NULL; + mappingclear((object *)mp); + INCREF(None); + return None; +} + static struct methodlist mapp_methods[] = { + {"clear", (method)mapping_clear}, {"has_key", (method)mapping_has_key}, {"items", (method)mapping_items}, {"keys", (method)mapping_keys}, |