summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-11-29 14:49:35 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:46:45 +0100
commite1733d72441ec5aff6d48abf6dd41a91e459df01 (patch)
treea5bbfd5504d0ff08c10cd53b8baaad0002f29575 /source4/libcli
parent1da2cfe03d956e5f209b049f931851b4afa1287c (diff)
downloadsamba-e1733d72441ec5aff6d48abf6dd41a91e459df01.tar.gz
samba-e1733d72441ec5aff6d48abf6dd41a91e459df01.tar.bz2
samba-e1733d72441ec5aff6d48abf6dd41a91e459df01.zip
r26194: Wrap the events subsystem in a separate file.
(This used to be commit cfb6bbdc31083308dbff29cf226a092c8a137c2a)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/swig/libcli_nbt.i21
-rw-r--r--source4/libcli/swig/libcli_smb.i3
2 files changed, 3 insertions, 21 deletions
diff --git a/source4/libcli/swig/libcli_nbt.i b/source4/libcli/swig/libcli_nbt.i
index 56d6d4206e..6fd85c2b8c 100644
--- a/source4/libcli/swig/libcli_nbt.i
+++ b/source4/libcli/swig/libcli_nbt.i
@@ -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"
-
-%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));
-}
+%import "../../lib/events/events.i"
/* 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);
diff --git a/source4/libcli/swig/libcli_smb.i b/source4/libcli/swig/libcli_smb.i
index c3b8edd7e9..32e043b2c6 100644
--- a/source4/libcli/swig/libcli_smb.i
+++ b/source4/libcli/swig/libcli_smb.i
@@ -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);