Rev 1111: Allow keyword arguments in crawl_revisions. in http://people.samba.org/bzr/jelmer/bzr-svn/cext

Jelmer Vernooij jelmer at samba.org
Sat Jun 21 16:57:06 BST 2008


At http://people.samba.org/bzr/jelmer/bzr-svn/cext

------------------------------------------------------------
revno: 1111
revision-id: jelmer at samba.org-20080621155705-8nnz24s1a5euihs7
parent: jelmer at samba.org-20080619154518-42h5p6fu8z4vefqy
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: cext
timestamp: Sat 2008-06-21 17:57:05 +0200
message:
  Allow keyword arguments in crawl_revisions.
modified:
  wc.c                           wc.pyx-20080313142018-10l8l23vha2j9e6b-1
=== modified file 'wc.c'
--- a/wc.c	2008-06-19 15:45:18 +0000
+++ b/wc.c	2008-06-21 15:57:05 +0000
@@ -445,7 +445,7 @@
 	Py_RETURN_NONE;
 }
 
-static PyObject *adm_crawl_revisions(PyObject *self, PyObject *args)
+static PyObject *adm_crawl_revisions(PyObject *self, PyObject *args, PyObject *kwargs)
 {
 	char *path;
 	PyObject *reporter;
@@ -454,8 +454,9 @@
 	apr_pool_t *temp_pool;
 	AdmObject *admobj = (AdmObject *)self;
 	svn_wc_traversal_info_t *traversal_info;
+	char *kwnames[] = { "path", "reporter", "restore_files", "recurse", "use_commit_times", "notify_func", NULL };
 
-	if (!PyArg_ParseTuple(args, "sO|bbbO", &path, &reporter, &restore_files, &recurse, &use_commit_times,
+	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sO|bbbO", kwnames, &path, &reporter, &restore_files, &recurse, &use_commit_times,
 						  &notify_func))
 		return NULL;
 
@@ -598,7 +599,7 @@
 	{ "add", adm_add, METH_VARARGS, NULL },
 	{ "copy", adm_copy, METH_VARARGS, NULL },
 	{ "delete", adm_delete, METH_VARARGS, NULL },
-	{ "crawl_revisions", adm_crawl_revisions, METH_VARARGS, NULL },
+	{ "crawl_revisions", (PyCFunction)adm_crawl_revisions, METH_VARARGS|METH_KEYWORDS, NULL },
 	{ "get_update_editor", adm_get_update_editor, METH_VARARGS, NULL },
 	{ "close", (PyCFunction)adm_close, METH_NOARGS, NULL },
 	{ "entry", (PyCFunction)adm_entry, METH_VARARGS, NULL },




More information about the bazaar-commits mailing list