At file:///home/jelmer/bzr.samba/python/ ------------------------------------------------------------ revno: 12003 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij <[EMAIL PROTECTED]> branch nick: python timestamp: Wed 2007-04-25 14:42:41 +0200 message: Add initial work on wrapper for loadparm. added: source/scripting/python/config.mk config.mk-20070425124132-wptmykwi2tvyqm26-1 source/scripting/python/param.c param.c-20070425124147-y6pej29g7xqsb3n6-1 modified: .bzrignore svn-v2:[EMAIL PROTECTED] === added file 'source/scripting/python/config.mk' --- a/source/scripting/python/config.mk 1970-01-01 00:00:00 +0000 +++ b/source/scripting/python/config.mk 2007-04-25 12:42:41 +0000 @@ -0,0 +1,4 @@ +[SUBSYSTEM::python_param] +PUBLIC_DEPENDENCIES = LIBPYTHON LIBSAMBA-CONFIG +OBJ_FILES = \ + param.o
=== added file 'source/scripting/python/param.c' --- a/source/scripting/python/param.c 1970-01-01 00:00:00 +0000 +++ b/source/scripting/python/param.c 2007-04-25 12:42:41 +0000 @@ -0,0 +1,56 @@ +/* + Unix SMB/CIFS implementation. + + Python wrapper for reading smb.conf files + + Copyright (C) Jelmer Vernooij 2007 + + 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 2 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, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "includes.h" +#include "scripting/ejs/smbcalls.h" +#include "Python.h" +#include "param/param.h" + +static PyObject *param_load(PyObject *self, PyObject *args) +{ + char *filename; + PyObject *param; + + if (!PyArg_ParseTuple(args, "s:new", &filename)) + return NULL; + + param = PyObject_New(); + + +} + +static PyMethodDef methods[] = { + { "load", (PyCFunction)param_load, METH_VARARGS, NULL}, + { NULL, NULL } +}; + +PyDoc_STRVAR(param_doc, "Simple wrappers around the smb.conf parsers"); + +PyMODINIT_FUNC initparam(void) +{ + PyObject *mod = Py_InitModule3("param", methods, param_doc); + if (mod == NULL) + return; + + PyModule_AddObject + +} === modified file '.bzrignore' --- a/.bzrignore 2007-04-24 15:41:33 +0000 +++ b/.bzrignore 2007-04-25 12:42:41 +0000 @@ -178,3 +178,4 @@ source/lib/python/Modules/Setup.config lib/ldb/swig/ldb.py source/lib/ldb/swig/ldb.py +source/lib/tdb/swig/tdb.py