bpo-33677: Fix signatures of tp_clear handlers for AST and deque. (GH-7196)

(cherry picked from commit a5c42284e69fb309bdd17ee8c1c120d1be383012)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index 38b9292..6a2f28e 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -528,10 +528,11 @@
     return 0;
 }
 
-static void
+static int
 ast_clear(AST_object *self)
 {
     Py_CLEAR(self->dict);
+    return 0;
 }
 
 static int