summaryrefslogtreecommitdiff
path: root/source4/auth/credentials/credentials_wrap.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-22 16:39:56 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-01-22 16:39:56 +0100
commit4075a2ba982ea56ff925e0a33839f0760fd71911 (patch)
tree87d87734257f814b7960a843e54455c447f34a9e /source4/auth/credentials/credentials_wrap.c
parent24da29746998de1001d18871dcbe8d37643667d5 (diff)
parent35c68316442808a135aafa864d19592108a4d879 (diff)
downloadsamba-4075a2ba982ea56ff925e0a33839f0760fd71911.tar.gz
samba-4075a2ba982ea56ff925e0a33839f0760fd71911.tar.bz2
samba-4075a2ba982ea56ff925e0a33839f0760fd71911.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-python
(This used to be commit 2f57e25f8f692889d9e057e13256f8a24c5ec10c)
Diffstat (limited to 'source4/auth/credentials/credentials_wrap.c')
-rw-r--r--source4/auth/credentials/credentials_wrap.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/auth/credentials/credentials_wrap.c b/source4/auth/credentials/credentials_wrap.c
index ebf7162c5b..146a81abaf 100644
--- a/source4/auth/credentials/credentials_wrap.c
+++ b/source4/auth/credentials/credentials_wrap.c
@@ -2774,6 +2774,22 @@ SWIGINTERNINLINE PyObject*
}
SWIGINTERN void delete_cli_credentials(cli_credentials *self){ talloc_free(self); }
+
+struct cli_credentials *cli_credentials_from_py_object(PyObject *py_obj)
+{
+ struct cli_credentials *ret;
+
+ if (py_obj == Py_None) {
+ return cli_credentials_init_anon(NULL);
+ }
+
+ if (SWIG_ConvertPtr(py_obj, (void *)&ret, SWIGTYPE_p_cli_credentials, 0 | 0 ) < 0) {
+ return NULL;
+ }
+ return ret;
+}
+
+
#ifdef __cplusplus
extern "C" {
#endif