diff options
author | Stefan Metzmacher <metze@samba.org> | 2017-04-26 15:25:43 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-05-30 12:16:57 +0200 |
commit | 41981db0d32b24fede0e52555bd0193ae330cc4b (patch) | |
tree | 43688a586ae074801c9a9d6cc9e8143efb539ada /source4/lib | |
parent | 50c7112b002bc33f46e827bac47857215e135015 (diff) | |
download | samba-41981db0d32b24fede0e52555bd0193ae330cc4b.tar.gz |
s4:lib/com: remove unused pycom binding
This is completely untested and from reading the code it doesn't really
do anything beside always returning None from the get_class_object() method.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue May 30 12:16:57 CEST 2017 on sn-devel-144
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/com/pycom.c | 83 | ||||
-rw-r--r-- | source4/lib/com/wscript_build | 7 |
2 files changed, 0 insertions, 90 deletions
diff --git a/source4/lib/com/pycom.c b/source4/lib/com/pycom.c deleted file mode 100644 index b4458121812..00000000000 --- a/source4/lib/com/pycom.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - Unix SMB/CIFS implementation. - Python bindings for COM library. - Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <Python.h> -#include "includes.h" -#include "lib/com/com.h" -#include "librpc/ndr/libndr.h" -#include "libcli/util/pyerrors.h" - -void initcom(void); - -static struct com_context *py_com_ctx = NULL; /* FIXME: evil global */ - -static PyObject *py_get_class_object(PyObject *self, PyObject *args) -{ - char *s_clsid, *s_iid; - struct GUID clsid, iid; - struct IUnknown *object; - NTSTATUS status; - WERROR error; - - if (!PyArg_ParseTuple(args, "ss", &s_clsid, &s_iid)) - return NULL; - - status = GUID_from_string(s_clsid, &clsid); - if (!NT_STATUS_IS_OK(status)) { - PyErr_FromNTSTATUS(status); - return NULL; - } - - status = GUID_from_string(s_iid, &iid); - if (!NT_STATUS_IS_OK(status)) { - PyErr_FromNTSTATUS(status); - return NULL; - } - - error = com_get_class_object(py_com_ctx, &clsid, &iid, &object); - if (!W_ERROR_IS_OK(error)) { - PyErr_FromWERROR(error); - return NULL; - } - - /* FIXME: Magic, integrate with stubs generated by pidl. */ - - Py_RETURN_NONE; -} - -static struct PyMethodDef com_methods[] = { - { "get_class_object", (PyCFunction)py_get_class_object, METH_VARARGS, "S.get_class_object(clsid, iid) -> instance" }, - { NULL }, -}; - -void initcom(void) -{ - PyObject *m; - WERROR error; - - error = com_init_ctx(&py_com_ctx, NULL); - if (!W_ERROR_IS_OK(error)) { - PyErr_FromWERROR(error); - return; - } - - m = Py_InitModule3("com", com_methods, "Simple COM implementation"); - if (m == NULL) - return; -} diff --git a/source4/lib/com/wscript_build b/source4/lib/com/wscript_build index 763de1fdca3..b96f39fc5da 100644 --- a/source4/lib/com/wscript_build +++ b/source4/lib/com/wscript_build @@ -26,10 +26,3 @@ bld.SAMBA_MODULE('com_simple', init_function='com_simple_init' ) - -bld.SAMBA_PYTHON('pycom', - source='pycom.c', - deps='COM', - realname='samba/com.so', - ) - |