summaryrefslogtreecommitdiffstats
path: root/Objects/mappingobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/mappingobject.c')
-rw-r--r--Objects/mappingobject.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Objects/mappingobject.c b/Objects/mappingobject.c
index 8f3d3a6..51f0018 100644
--- a/Objects/mappingobject.c
+++ b/Objects/mappingobject.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},