*
**** Alterations to Henry's code are...
****
- **** Copyright (c) 1991-1999, Larry Wall
+ **** Copyright (c) 1991-2000, Larry Wall
****
**** You may distribute under the terms of either the GNU General Public
**** License or the Artistic License, as specified in the README file.
STATIC void
S_cl_init(pTHX_ struct regnode_charclass_class *cl)
{
+ Zero(cl, 1, struct regnode_charclass_class);
cl->type = ANYOF;
cl_anything(cl);
}
STATIC void
S_cl_init_zero(pTHX_ struct regnode_charclass_class *cl)
{
+ Zero(cl, 1, struct regnode_charclass_class);
cl->type = ANYOF;
cl_anything(cl);
- ANYOF_CLASS_ZERO(cl);
- ANYOF_BITMAP_ZERO(cl);
if (LOC)
cl->flags |= ANYOF_LOCALE;
}
char, regexp);
if (r == NULL)
FAIL("regexp out of space");
+#ifdef DEBUGGING
+ /* avoid reading uninitialized memory in DEBUGGING code in study_chunk() */
+ Zero(r, sizeof(regexp) + (unsigned)PL_regsize * sizeof(regnode), char);
+#endif
r->refcnt = 1;
r->prelen = xend - exp;
r->precomp = PL_regprecomp;