Author: tpot Date: 2007-09-26 01:26:36 +0000 (Wed, 26 Sep 2007) New Revision: 25329
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25329 Log: 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. Modified: branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i Changeset: Modified: branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i =================================================================== --- branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i 2007-09-26 01:02:52 UTC (rev 25328) +++ branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i 2007-09-26 01:26:36 UTC (rev 25329) @@ -37,10 +37,6 @@ #undef strcpy -/* Loadparm parameters */ - -static struct loadparm_context lp_ctx; - %} %apply bool { BOOL }; @@ -132,11 +128,17 @@ %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(); %}