]>
git.saurik.com Git - wxWidgets.git/blob - src/regex/regfree.c
10 - regfree - free everything
11 = extern void regfree(regex_t *);
17 register struct re_guts
*g
;
19 if (preg
->re_magic
!= MAGIC1
) /* oops */
20 return; /* nice to complain, but hard */
23 if (g
== NULL
|| g
->magic
!= MAGIC2
) /* oops again */
25 preg
->re_magic
= 0; /* mark it invalid */
26 g
->magic
= 0; /* mark it invalid */
29 free((char *)g
->strip
);
31 free((char *)g
->sets
);
32 if (g
->setbits
!= NULL
)
33 free((char *)g
->setbits
);