This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8878f89
)
Copying the first parameter in the macro del_body seems to reduce
author
Nicholas Clark
<nick@ccl4.org>
Sat, 2 Jul 2005 16:25:06 +0000
(16:25 +0000)
committer
Nicholas Clark
<nick@ccl4.org>
Sat, 2 Jul 2005 16:25:06 +0000
(16:25 +0000)
code size. Presumably an expression is no longer evaluated twice.
p4raw-id: //depot/perl@25053
sv.c
patch
|
blob
|
blame
|
history
diff --git
a/sv.c
b/sv.c
index
d416b1b
..
83c2d4e
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-1127,9
+1127,10
@@
S_new_body(pTHX_ void **arena_root, void **root, size_t size)
#define del_body(thing, root) \
STMT_START { \
+ void **thing_copy = (void **)thing; \
LOCK_SV_MUTEX; \
- *
(void **)thing = *root;
\
- *root = (void*)thing
;
\
+ *
thing_copy = *root;
\
+ *root = (void*)thing
_copy;
\
UNLOCK_SV_MUTEX; \
} STMT_END