Rev 1701: Add bindings for ra.print_modules. in file:///data/jelmer/bzr-svn/trunk/
Jelmer Vernooij
jelmer at samba.org
Fri Aug 29 17:55:07 BST 2008
At file:///data/jelmer/bzr-svn/trunk/
------------------------------------------------------------
revno: 1701
revision-id: jelmer at samba.org-20080829165505-jszvcs82fkz93teq
parent: jelmer at samba.org-20080829163532-qa8duhya3xbqav69
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Fri 2008-08-29 18:55:05 +0200
message:
Add bindings for ra.print_modules.
modified:
ra.c ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
=== modified file 'ra.c'
--- a/ra.c 2008-08-29 08:55:04 +0000
+++ b/ra.c 2008-08-29 16:55:05 +0000
@@ -2729,6 +2729,30 @@
return (PyObject *)auth;
}
+static PyObject *print_modules(PyObject *self)
+{
+ svn_stringbuf_t *stringbuf;
+ svn_string_t *string;
+ PyObject *ret;
+ apr_pool_t *pool = Pool(NULL);
+ if (pool == NULL)
+ return NULL;
+ stringbuf = svn_stringbuf_create("", pool);
+ if (stringbuf == NULL) {
+ apr_pool_destroy(pool);
+ return NULL;
+ }
+ RUN_SVN_WITH_POOL(pool, svn_ra_print_modules(stringbuf, pool));
+ string = svn_string_create_from_buf(stringbuf, pool);
+ if (string == NULL) {
+ apr_pool_destroy(pool);
+ return NULL;
+ }
+ ret = PyString_FromStringAndSize(string->data, string->len);
+ apr_pool_destroy(pool);
+ return ret;
+}
+
static PyMethodDef ra_module_methods[] = {
{ "version", (PyCFunction)version, METH_NOARGS, NULL },
{ "get_ssl_client_cert_pw_file_provider", (PyCFunction)get_ssl_client_cert_pw_file_provider, METH_NOARGS, NULL },
@@ -2741,6 +2765,7 @@
{ "get_ssl_client_cert_prompt_provider", (PyCFunction)get_ssl_client_cert_prompt_provider, METH_VARARGS, NULL },
{ "get_ssl_client_cert_pw_prompt_provider", (PyCFunction)get_ssl_client_cert_pw_prompt_provider, METH_VARARGS, NULL },
{ "get_username_provider", (PyCFunction)get_username_provider, METH_NOARGS, NULL },
+ { "print_modules", (PyCFunction)print_modules, METH_NOARGS, NULL },
{ NULL, }
};
More information about the bazaar-commits
mailing list