summaryrefslogtreecommitdiff
path: root/source4/libcli/swig
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/swig')
-rw-r--r--source4/libcli/swig/libcli_nbt.i32
-rw-r--r--source4/libcli/swig/libcli_smb.i5
2 files changed, 4 insertions, 33 deletions
diff --git a/source4/libcli/swig/libcli_nbt.i b/source4/libcli/swig/libcli_nbt.i
index ec7632ccf4..56d6d4206e 100644
--- a/source4/libcli/swig/libcli_nbt.i
+++ b/source4/libcli/swig/libcli_nbt.i
@@ -39,29 +39,8 @@
%}
-%apply bool { bool };
-%apply int { uint8_t };
-%apply int { int8_t };
-%apply unsigned int { uint16_t };
-%apply int { int16_t };
-
-%typemap(in) uint32_t {
- if (PyLong_Check($input))
- $1 = PyLong_AsUnsignedLong($input);
- else if (PyInt_Check($input))
- $1 = PyInt_AsLong($input);
- else {
- PyErr_SetString(PyExc_TypeError,"Expected a long or an int");
- return NULL;
- }
-}
-
-%typemap(out) uint32_t {
- $result = PyLong_FromUnsignedLong($1);
-}
-
-%apply unsigned long long { uint64_t };
-%apply long long { int64_t };
+%import "stdint.i"
+%import "../../lib/talloc/talloc.i"
%typemap(in) NTSTATUS {
if (PyLong_Check($input))
@@ -78,9 +57,6 @@
$result = PyLong_FromUnsignedLong(NT_STATUS_V($1));
}
-TALLOC_CTX *talloc_init(char *name);
-int talloc_free(TALLOC_CTX *ptr);
-
/* Function prototypes */
struct event_context *event_context_init(TALLOC_CTX *mem_ctx);
@@ -138,7 +114,3 @@ NTSTATUS do_nbt_name_query(struct nbt_name_socket *nbtsock,
return nbt_name_query(nbtsock, mem_ctx, io);
}
%}
-
-%init %{
- lp_load();
-%}
diff --git a/source4/libcli/swig/libcli_smb.i b/source4/libcli/swig/libcli_smb.i
index 8eb055c2f0..c3b8edd7e9 100644
--- a/source4/libcli/swig/libcli_smb.i
+++ b/source4/libcli/swig/libcli_smb.i
@@ -1,14 +1,13 @@
%module libcli_smb
+%import "../../lib/talloc/talloc.i"
+
%{
#include "includes.h"
-#include "lib/talloc/talloc.h"
#include "lib/events/events.h"
#include "libcli/raw/libcliraw.h"
%}
-TALLOC_CTX *talloc_init(char *name);
-int talloc_free(TALLOC_CTX *ptr);
struct event_context *event_context_init(TALLOC_CTX *mem_ctx);
struct smbcli_socket *smbcli_sock_connect_byname(const char *host, int port,