svn commit: samba r25343 - in branches/4.0-python: .
source/scripting/python
jelmer at samba.org
jelmer at samba.org
Wed Sep 26 02:06:24 GMT 2007
Author: jelmer
Date: 2007-09-26 02:06:23 +0000 (Wed, 26 Sep 2007)
New Revision: 25343
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25343
Log:
Add initial work on wrapper for loadparm.
Added:
branches/4.0-python/source/scripting/python/config.mk
branches/4.0-python/source/scripting/python/param.c
Modified:
branches/4.0-python/
branches/4.0-python/.bzrignore
Changeset:
Property changes on: branches/4.0-python
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...
Modified: branches/4.0-python/.bzrignore
===================================================================
--- branches/4.0-python/.bzrignore 2007-09-26 02:06:20 UTC (rev 25342)
+++ branches/4.0-python/.bzrignore 2007-09-26 02:06:23 UTC (rev 25343)
@@ -209,3 +209,4 @@
source/lib/python/Modules/Setup.config
lib/ldb/swig/ldb.py
source/lib/ldb/swig/ldb.py
+source/lib/tdb/swig/tdb.py
Added: branches/4.0-python/source/scripting/python/config.mk
===================================================================
--- branches/4.0-python/source/scripting/python/config.mk 2007-09-26 02:06:20 UTC (rev 25342)
+++ branches/4.0-python/source/scripting/python/config.mk 2007-09-26 02:06:23 UTC (rev 25343)
@@ -0,0 +1,4 @@
+[SUBSYSTEM::python_param]
+PUBLIC_DEPENDENCIES = LIBPYTHON LIBSAMBA-CONFIG
+OBJ_FILES = \
+ param.o
Added: branches/4.0-python/source/scripting/python/param.c
===================================================================
--- branches/4.0-python/source/scripting/python/param.c 2007-09-26 02:06:20 UTC (rev 25342)
+++ branches/4.0-python/source/scripting/python/param.c 2007-09-26 02:06:23 UTC (rev 25343)
@@ -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
+
+}
More information about the samba-cvs
mailing list