Change 29525 by [EMAIL PROTECTED] on 2006/12/11 22:52:46
Add BmPREVIOUS_set(), and use it in the one place that BmPREVIOUS is
modified.
Affected files ...
... //depot/perl/sv.h#295 edit
... //depot/perl/util.c#597 edit
Differences ...
==== //depot/perl/sv.h#295 (text) ====
Index: perl/sv.h
--- perl/sv.h#294~29524~ 2006-12-11 14:18:53.000000000 -0800
+++ perl/sv.h 2006-12-11 14:52:46.000000000 -0800
@@ -1347,6 +1347,9 @@
# define BmUSEFUL(sv) ((XPVBM*) SvANY(sv))->xiv_u.xivu_i32
# define BmPREVIOUS(sv) ((XPVBM*) SvANY(sv))->xbm_previous
#endif
+#define BmPREVIOUS_set(sv, val)
\
+ STMT_START { assert(SvTYPE(sv) == SVt_PVBM); \
+ (((XPVBM*)SvANY(sv))->xbm_previous = (U16)(val)); } STMT_END
#define FmLINES(sv) ((XPVFM*) SvANY(sv))->xfm_lines
==== //depot/perl/util.c#597 (text) ====
Index: perl/util.c
--- perl/util.c#596~29524~ 2006-12-11 14:18:53.000000000 -0800
+++ perl/util.c 2006-12-11 14:52:46.000000000 -0800
@@ -522,7 +522,7 @@
}
}
BmRARE(sv) = s[rarest];
- BmPREVIOUS(sv) = (U16)rarest;
+ BmPREVIOUS_set(sv, rarest);
BmUSEFUL(sv) = 100; /* Initial value */
if (flags & FBMcf_TAIL)
SvTAIL_on(sv);
End of Patch.