svn commit: samba r26194 - in branches/SAMBA_4_0: . source source/lib/events source/libcli/swig

jelmer at samba.org jelmer at samba.org
Thu Nov 29 14:49:36 GMT 2007


Author: jelmer
Date: 2007-11-29 14:49:35 +0000 (Thu, 29 Nov 2007)
New Revision: 26194

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26194

Log:
Wrap the events subsystem in a separate file.
Added:
   branches/SAMBA_4_0/source/lib/events/events.i
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/.bzrignore
   branches/SAMBA_4_0/source/autogen.sh
   branches/SAMBA_4_0/source/lib/events/config.mk
   branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i
   branches/SAMBA_4_0/source/libcli/swig/libcli_smb.i


Changeset:

Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/.bzrignore
===================================================================
--- branches/SAMBA_4_0/.bzrignore	2007-11-29 08:02:36 UTC (rev 26193)
+++ branches/SAMBA_4_0/.bzrignore	2007-11-29 14:49:35 UTC (rev 26194)
@@ -220,3 +220,13 @@
 source/lib/registry/tests/proto.h
 source/auth/auth_wrap.c
 source/auth/credentials/credentials_wrap.c
+source/lib/registry/registry_wrap.c
+source/lib/talloc/talloc.py
+source/lib/talloc/talloc_wrap.c
+source/lib/ldb/ldb_wrap.c
+source/librpc/rpc/dcerpc_wrap.c
+source/libcli/swig/libcli_smb.py
+source/libcli/swig/libcli_smb_wrap.c
+source/libcli/swig/libcli_nbt_wrap.c
+source/lib/events/events.py
+source/lib/events/events_wrap.c

Modified: branches/SAMBA_4_0/source/autogen.sh
===================================================================
--- branches/SAMBA_4_0/source/autogen.sh	2007-11-29 08:02:36 UTC (rev 26193)
+++ branches/SAMBA_4_0/source/autogen.sh	2007-11-29 14:49:35 UTC (rev 26194)
@@ -65,7 +65,7 @@
 
 # Run swig if it is available
 SWIG=swig
-SWIG_FILES="./scripting/python/misc.i ./auth/auth.i ./auth/credentials/credentials.i ./lib/talloc/talloc.i ./lib/ldb/ldb.i ./lib/registry/registry.i ./lib/tdb/tdb.i ./libcli/swig/libcli_smb.i ./libcli/swig/libcli_nbt.i ./librpc/rpc/dcerpc.i"
+SWIG_FILES="./scripting/python/misc.i ./auth/auth.i ./auth/credentials/credentials.i ./lib/talloc/talloc.i ./lib/ldb/ldb.i ./lib/registry/registry.i ./lib/tdb/tdb.i ./libcli/swig/libcli_smb.i ./libcli/swig/libcli_nbt.i ./librpc/rpc/dcerpc.i lib/events/events.i"
 if which $SWIG >/dev/null 2>&1; then
 	for I in $SWIG_FILES
 	do

Modified: branches/SAMBA_4_0/source/lib/events/config.mk
===================================================================
--- branches/SAMBA_4_0/source/lib/events/config.mk	2007-11-29 08:02:36 UTC (rev 26193)
+++ branches/SAMBA_4_0/source/lib/events/config.mk	2007-11-29 14:49:35 UTC (rev 26194)
@@ -36,3 +36,7 @@
 PUBLIC_DEPENDENCIES = LIBTALLOC
 # End SUBSYSTEM LIBEVENTS
 ##############################
+
+[PYTHON::swig_python]
+SWIG_FILE = events.i
+PRIVATE_DEPENDENCIES = LIBEVENTS

Added: branches/SAMBA_4_0/source/lib/events/events.i
===================================================================
--- branches/SAMBA_4_0/source/lib/events/events.i	2007-11-29 08:02:36 UTC (rev 26193)
+++ branches/SAMBA_4_0/source/lib/events/events.i	2007-11-29 14:49:35 UTC (rev 26194)
@@ -0,0 +1,31 @@
+/* 
+   Unix SMB/CIFS implementation.
+   Copyright (C) Jelmer Vernooij <jelmer at samba.org> 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 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/>.
+*/
+
+%module(package="samba.events") events;
+
+%import "../talloc/talloc.i";
+
+%{
+#include "lib/events/events.h"
+%}
+
+struct event_context *event_context_init(TALLOC_CTX *mem_ctx);
+
+%typemap(default) struct event_context * {
+    $1 = event_context_init(NULL);
+}

Modified: branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i
===================================================================
--- branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i	2007-11-29 08:02:36 UTC (rev 26193)
+++ branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i	2007-11-29 14:49:35 UTC (rev 26194)
@@ -29,7 +29,6 @@
 
 #include "includes.h"
 #include "lib/talloc/talloc.h"
-#include "lib/events/events.h"
 #include "libcli/nbt/libnbt.h"
 #include "param/param.h"
 
@@ -40,27 +39,11 @@
 %}
 
 %import "stdint.i"
+%import "../util/errors.i"
 %import "../../lib/talloc/talloc.i"
+%import "../../lib/events/events.i"
 
-%typemap(in) NTSTATUS {
-        if (PyLong_Check($input))
-                $1 = NT_STATUS(PyLong_AsUnsignedLong($input));
-        else if (PyInt_Check($input))
-                $1 = NT_STATUS(PyInt_AsLong($input));
-        else {
-                PyErr_SetString(PyExc_TypeError, "Expected a long or an int");
-                return NULL;
-        }
-}
-
-%typemap(out) NTSTATUS {
-        $result = PyLong_FromUnsignedLong(NT_STATUS_V($1));
-}
-
 /* Function prototypes */
-
-struct event_context *event_context_init(TALLOC_CTX *mem_ctx);
-
 struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx, 
 					     struct event_context *event_ctx);
 

Modified: branches/SAMBA_4_0/source/libcli/swig/libcli_smb.i
===================================================================
--- branches/SAMBA_4_0/source/libcli/swig/libcli_smb.i	2007-11-29 08:02:36 UTC (rev 26193)
+++ branches/SAMBA_4_0/source/libcli/swig/libcli_smb.i	2007-11-29 14:49:35 UTC (rev 26194)
@@ -1,6 +1,7 @@
 %module libcli_smb
 
 %import "../../lib/talloc/talloc.i"
+%import "../../lib/events/events.i"
 
 %{
 #include "includes.h"
@@ -8,8 +9,6 @@
 #include "libcli/raw/libcliraw.h"
 %}
 
-struct event_context *event_context_init(TALLOC_CTX *mem_ctx);
-
 struct smbcli_socket *smbcli_sock_connect_byname(const char *host, int port,
 						 TALLOC_CTX *mem_ctx,
 						 struct event_context *event_ctx);



More information about the samba-cvs mailing list