summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2007-09-26 01:26:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:14 -0500
commit8dc845d42581e6dabc00abdf8f82025a5f44fdcd (patch)
tree5df56def3750aa14d6cf857f8cde6700a2dfec1f /source4
parent7c30312c1734038825ac2e18fa2a32eb775d5c8d (diff)
downloadsamba-8dc845d42581e6dabc00abdf8f82025a5f44fdcd.tar.gz
samba-8dc845d42581e6dabc00abdf8f82025a5f44fdcd.tar.bz2
samba-8dc845d42581e6dabc00abdf8f82025a5f44fdcd.zip
r25329: A solution to SWIG not being able to handle a structure and a function
having the same name. Hey we can now query nbt names from Python. (This used to be commit 30c34d7a4b12c626bc98e29aa6691ad975845777)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/swig/libcli_nbt.i18
1 files changed, 10 insertions, 8 deletions
diff --git a/source4/libcli/swig/libcli_nbt.i b/source4/libcli/swig/libcli_nbt.i
index 6bcbd7a65b..9aa81acd1f 100644
--- a/source4/libcli/swig/libcli_nbt.i
+++ b/source4/libcli/swig/libcli_nbt.i
@@ -37,10 +37,6 @@
#undef strcpy
-/* Loadparm parameters */
-
-static struct loadparm_context lp_ctx;
-
%}
%apply bool { BOOL };
@@ -132,11 +128,17 @@ struct nbt_name_query {
%include "carrays.i"
%array_functions(char *, char_ptr_array);
-%rename(do_nbt_name_query) nbt_name_query;
+NTSTATUS do_nbt_name_query(struct nbt_name_socket *nbtsock,
+ TALLOC_CTX *mem_ctx, struct nbt_name_query *io);
-NTSTATUS nbt_name_query(struct nbt_name_socket *nbtsock,
- TALLOC_CTX *mem_ctx, struct nbt_name_query *io);
+%{
+NTSTATUS do_nbt_name_query(struct nbt_name_socket *nbtsock,
+ TALLOC_CTX *mem_ctx, struct nbt_name_query *io)
+{
+ return nbt_name_query(nbtsock, mem_ctx, io);
+}
+%}
%init %{
- loadparm_init(&lp_ctx);
+ lp_load();
%}