This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [PATCH] predecrement vs postdecrement
authorJarkko Hietaniemi <jhi@iki.fi>
Sat, 29 Oct 2005 11:52:25 +0000 (14:52 +0300)
committerSteve Peters <steve@fisharerojo.org>
Sat, 29 Oct 2005 11:02:12 +0000 (11:02 +0000)
Message-ID: <43633849.6060809@gmail.com>

p4raw-id: //depot/perl@25870

regcomp.c

index 744b380..d860831 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -6072,7 +6072,7 @@ Perl_pregfree(pTHX_ struct regexp *r)
                        reg_trie_data *trie=(reg_trie_data*)r->data->data[n];
                        U32 refcount;
                        OP_REFCNT_LOCK;
-                       refcount = trie->refcount--;
+                       refcount = --trie->refcount;
                        OP_REFCNT_UNLOCK;
                        if ( !refcount ) {
                            Safefree(trie->charmap);