diff mbox

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

Message ID 72bd55393455ddd1cfba7902e9136b92b87b9a7b.1432749206.git.bcodding@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Benjamin Coddington May 27, 2015, 6:01 p.m. UTC
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@redhat.com>
---
 gssapi/gssapi.i |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Kinglong Mee June 25, 2015, 3:18 a.m. UTC | #1
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@redhat.com>

Anyway this one is useful.

Acked-by: Kinglong Mee <kinglongmee@gmail.com>

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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);
 
 /********/