summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/environs/py_user.c16
-rw-r--r--python/environs/py_user.h1
-rw-r--r--python/lassomod.c11
3 files changed, 23 insertions, 5 deletions
diff --git a/python/environs/py_user.c b/python/environs/py_user.c
index 5d26b829..0e51153b 100644
--- a/python/environs/py_user.c
+++ b/python/environs/py_user.c
@@ -60,6 +60,22 @@ PyObject *user_new_from_dump(PyObject *self, PyObject *args) {
return (LassoUser_wrap(user));
}
+PyObject *user_destroy(PyObject *self, PyObject *args) {
+ PyObject *user_obj;
+
+ if (CheckArgs(args, "O:user_destroy")) {
+ if(!PyArg_ParseTuple(args, (char *) "O:user_destroy",
+ &user_obj))
+ return NULL;
+ }
+ else return NULL;
+
+ lasso_user_destroy(LassoUser_get(user_obj));
+
+ Py_INCREF(Py_None);
+ return (Py_None);
+}
+
PyObject *user_dump(PyObject *self, PyObject *args) {
PyObject *user_obj;
gchar *dump;
diff --git a/python/environs/py_user.h b/python/environs/py_user.h
index cdde6d04..128c9e21 100644
--- a/python/environs/py_user.h
+++ b/python/environs/py_user.h
@@ -38,6 +38,7 @@ PyObject *LassoUser_wrap(LassoUser *user);
PyObject *user_new(PyObject *self, PyObject *args);
PyObject *user_new_from_dump(PyObject *self, PyObject *args);
+PyObject *user_destroy(PyObject *self, PyObject *args);
PyObject *user_dump(PyObject *self, PyObject *args);
PyObject *user_get_assertion(PyObject *self, PyObject *args);
PyObject *user_get_next_providerID(PyObject *self, PyObject *args);
diff --git a/python/lassomod.c b/python/lassomod.c
index c916df07..21e62e4f 100644
--- a/python/lassomod.c
+++ b/python/lassomod.c
@@ -235,12 +235,13 @@ static PyMethodDef lasso_methods[] = {
{"server_dump", server_dump, METH_VARARGS},
/* py_user.h */
- {"user_new", user_new, METH_VARARGS},
- {"user_new_from_dump", user_new_from_dump, METH_VARARGS},
- {"user_dump", user_dump, METH_VARARGS},
- {"user_get_assertion", user_get_assertion, METH_VARARGS},
+ {"user_new", user_new, METH_VARARGS},
+ {"user_new_from_dump", user_new_from_dump, METH_VARARGS},
+ {"user_destroy", user_destroy, METH_VARARGS},
+ {"user_dump", user_dump, METH_VARARGS},
+ {"user_get_assertion", user_get_assertion, METH_VARARGS},
{"user_get_next_providerID", user_get_next_providerID, METH_VARARGS},
- {"user_remove_assertion", user_remove_assertion, METH_VARARGS},
+ {"user_remove_assertion", user_remove_assertion, METH_VARARGS},
{NULL, NULL} /* End of Methods Sentinel */
};