Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing *error getting set to itself, which must be an error #2038

Closed
p6rt opened this issue Aug 9, 2010 · 4 comments
Closed

Fixing *error getting set to itself, which must be an error #2038

p6rt opened this issue Aug 9, 2010 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 9, 2010

Migrated from rt.perl.org#77098 (status was 'resolved')

Searchable as RT77098$

@p6rt
Copy link
Author

p6rt commented Aug 9, 2010

From @petdance

From fe669b447b49aea2500f8ca29f7e20832d86684f Mon Sep 17 00​:00​:00 2001
From​: Andy Lester <andy@​petdance.com>
Date​: Sun, 8 Aug 2010 23​:26​:59 -0500
Subject​: [PATCH] Fix a problem of setting *error with itself.


src/binder/bind.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

Inline Patch
diff --git a/src/binder/bind.c b/src/binder/bind.c
index d64c237..18a8f80 100644
--- a/src/binder/bind.c
+++ b/src/binder/bind.c
@@ -767,7 +767,7 @@ Rakudo_binding_bind_llsig(PARROT_INTERP, PMC *lexpad, PMC *llsig,
     if (cur_pos_arg < num_pos_args && !suppress_arity_fail) {
         /* Oh noes, too many positionals passed. */
         if (error)
-            *error = *error = Rakudo_binding_arity_fail(interp, elements, num_elements, num_pos_args, 1);
+            *error = Rakudo_binding_arity_fail(interp, elements, num_elements, num_pos_args, 1);
         return BIND_RESULT_FAIL;
     }
     if (!PMC_IS_NULL(named_args_copy) && VTABLE_elements(interp, named_args_copy)) {
-- 
1.7.1

@p6rt
Copy link
Author

p6rt commented Aug 9, 2010

@coke - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Aug 9, 2010

From @coke

On Sun Aug 08 22​:14​:02 2010, petdance wrote​:

From fe669b447b49aea2500f8ca29f7e20832d86684f Mon Sep 17 00​:00​:00 2001
From​: Andy Lester <andy@​petdance.com>
Date​: Sun, 8 Aug 2010 23​:26​:59 -0500
Subject​: [PATCH] Fix a problem of setting *error with itself.

---
src/binder/bind.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/binder/bind.c b/src/binder/bind.c
index d64c237..18a8f80 100644
--- a/src/binder/bind.c
+++ b/src/binder/bind.c
@​@​ -767,7 +767,7 @​@​ Rakudo_binding_bind_llsig(PARROT_INTERP, PMC
*lexpad, PMC *llsig,
if (cur_pos_arg < num_pos_args && !suppress_arity_fail) {
/* Oh noes, too many positionals passed. */
if (error)
- *error = *error = Rakudo_binding_arity_fail(interp,
elements, num_elements, num_pos_args, 1);
+ *error = Rakudo_binding_arity_fail(interp, elements,
num_elements, num_pos_args, 1);
return BIND_RESULT_FAIL;
}
if (!PMC_IS_NULL(named_args_copy) && VTABLE_elements(interp,
named_args_copy)) {

Thanks, applied in 6d9691d;

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Aug 9, 2010

@coke - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Aug 9, 2010
@p6rt p6rt added the patch label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant