r25329: A solution to SWIG not being able to handle a structure and a function
authorTim Potter <tpot@samba.org>
Wed, 26 Sep 2007 01:26:36 +0000 (01:26 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:07:14 +0000 (15:07 -0500)
having the same name.  Hey we can now query nbt names from Python.
(This used to be commit 30c34d7a4b12c626bc98e29aa6691ad975845777)

source4/libcli/swig/libcli_nbt.i

index 6bcbd7a65be37fd090fcb0e9f0c7f883442ea5d4..9aa81acd1fb93f616083c3ded261205fc2f345c2 100644 (file)
 
 #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();
 %}