Re: [PATCH pynfs 1/3] Fix default arg order error on swig > 1.x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/28/2015 2:01 AM, Benjamin Coddington wrote:
> The gssapi.py module ends up with
> def initSecContext(name, context=None, INPUT=0, cred=0, mech, flags=2, time=0, chan=0):
> 
> which creates the error "SyntaxError: non-default argument follows default
> argument" on import.  Revert to earlier swig behavior of using compact
> default args.
> 
> Signed-off-by: Benjamin Coddington <bcodding@xxxxxxxxxx>

Anyway this one is useful.

Acked-by: Kinglong Mee <kinglongmee@xxxxxxxxx>

thanks,
Kinglong Mee

> ---
>  gssapi/gssapi.i |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/gssapi/gssapi.i b/gssapi/gssapi.i
> index 5b66ce0..28656c7 100644
> --- a/gssapi/gssapi.i
> +++ b/gssapi/gssapi.i
> @@ -487,6 +487,7 @@ OM_uint32 reordered_init_sec_context
>  %apply gss_buffer_t OUTPUT {gss_buffer_t token};
>  %apply OM_uint32 *OUTPUT {OM_uint32 *flags, OM_uint32 *time};
>  %feature("autodoc", "initSecContext(gss_name_t name, gss_ctx_id_t *context=None, string token=None, gss_cred_id_t cred=None, gss_OID mech=krb5oid, int flags=0, int time=0, gss_channel_bindings_t chan=None) -> context, mech, token, flags, time");
> +%feature("compactdefaultargs");
>  OM_uint32 reordered_init_sec_context
>  	        (OM_uint32 *minor,		/* minor_status */
>  		 gss_name_t name,			/* target_name IN*/
> @@ -507,6 +508,7 @@ OM_uint32 reordered_init_sec_context
>  %clear gss_OID *mech;
>  %clear gss_buffer_t token;
>  %clear OM_uint32 *flags, OM_uint32 *time;
> +%feature("compactdefaultargs", 0);
>  
>  /********/
>  
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux