diff options
Diffstat (limited to 'source4/auth/credentials/credentials_wrap.c')
-rw-r--r-- | source4/auth/credentials/credentials_wrap.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/auth/credentials/credentials_wrap.c b/source4/auth/credentials/credentials_wrap.c index ebf7162c5bb..146a81abafa 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 |