summaryrefslogtreecommitdiffstats
path: root/generic/regfree.c
blob: b0aaa708ac878dbcc88b3586857369690bb2eb0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
 * regfree - free an RE
 *
 * Copyright (c) 1998, 1999 Henry Spencer.  All rights reserved.
 *
 * Development of this software was funded, in part, by Cray Research Inc.,
 * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
 * Corporation, none of whom are responsible for the results.  The author
 * thanks all of them.
 *
 * Redistribution and use in source and binary forms -- with or without
 * modification -- are permitted for any purpose, provided that
 * redistributions in source form retain this entire copyright notice and
 * indicate the origin and nature of any modifications.
 *
 * I'd appreciate being given credit for this package in the documentation of
 * software which uses it, but that is not a requirement.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
 * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * You might think that this could be incorporated into regcomp.c, and that
 * would be a reasonable idea... except that this is a generic function (with
 * a generic name), applicable to all compiled REs regardless of the size of
 * their characters, whereas the stuff in regcomp.c gets compiled once per
 * character size.
 */

#include "regguts.h"

/*
 - regfree - free an RE (generic function, punts to RE-specific function)
 *
 * Ignoring invocation with NULL is a convenience.
 */
void
regfree(
    regex_t *re)
{
    if (re == NULL) {
	return;
    }
    (*((struct fns *)re->re_fns)->free)(re);
}

/*
 * Local Variables:
 * mode: c
 * c-basic-offset: 4
 * fill-column: 78
 * End:
 */
ass='column5'>| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the comments and add a test.bug_4dbdd9af14dgp2016-09-071-0/+31 * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix [d4e7780ca1681cd095dbd81fe264feff75c988f7|d4e7780ca1]: "global" cmd liter...jan.nijtmans2016-09-071-0/+115 |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge core-8-6-branchjan.nijtmans2016-09-051-8/+8 | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some patch clean-up, no change in functionalityjan.nijtmans2016-09-051-16/+10 | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Proposed patch for [d4e7780ca1681cd095dbd81fe264feff75c988f7|d4e7780ca1], by ...jan.nijtmans2016-09-021-10/+131 * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug in pushed transforms with full internal buffers not writing out.dkf2016-09-061-0/+23 | |/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow additional optional "interp" argument for testinterpresolver command. N...jan.nijtmans2016-09-051-1/+1 |/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a few test & docs fixescore_8_6_6core_8_6_6_rcdgp2016-07-261-4/+8 |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make a few tests more resilient to differences in the semantics of pipes betw...bug_db0a5f6417dkf2016-07-241-4/+8 | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | test repairsdgp2016-07-222-3/+1 * | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge 8.6dgp2016-07-184-54/+148 |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / / / / / / / / / / / / / | * | | | | | | | | | | | | | | | | | | | | | | | | | | | [104f2885bb] Rework the "chan" Tcl_ObjType to properly validate cached channe...dgp2016-07-181-0/+19 | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / / / / / / / / / / / / / / | | * | | | | | | | | | | | | | | | | | | | | | | | | | | [104f2885bb] Rework the "chan" Tcl_ObjType to properly validate cacheddgp2016-07-181-0/+19 | * | | | | | | | | | | | | | | | | | | | | | | | | | | | [77d58e3a7a] Test case independence: var.dkf2016-07-171-2/+4 | * | | | | | | | | | | | | | | | | | | | | | | | | | | | [77d58e3a7a] Test case independence: unload.dkf2016-07-172-52/+125 * | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge 8.6dgp2016-07-1615-130/+266 |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / / / / / / / / / / / / / | * | | | | | | | | | | | | | | | | | | | | | | | | | | | [77d58e3a7a] Test case independence: io, load, msgcat, namespace, safe.dkf2016-07-165-42/+72 | * | | | | | | | | | | | | | | | | | | | | | | | | | | | [77d58e3a7a] Test case independence: interp.dkf2016-07-151-14/+33 | * | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix docs and test failures. I had rolled back .PS1 (Powershell files) as bein...ashok2016-07-152-5/+6 | * | | | | | | | | | | | | | | | | | | | | | | | | | | | [77d58e3a7a] Test case independence: chanio, cmdah, env, history.dkf2016-07-144-8/+40 | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | [3606125] Make parser-related tests work on their own.dkf2016-07-121-3/+10 | * | | | | | | | | | | | | | | | | | | | | | | | | | | [3606388] Make variable-related tests work on their own.dkf2016-07-123-58/+105 | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | Dup test name. Bump to TclOO 1.0.5.dgp2016-07-121-1/+1 |/ / / / / / / / / / / / / / / / / / / / / / / / / / * | | | | | | | | | | | | | | | | | | | | | | | | | [cea0344a1] Restore a clearing of the ensemble rewrite in one execution pathdgp2016-07-111-0/+7 * | | | | | | | | | | | | | | | | | | | | | | | | | Avoid memory leak in test.dgp2016-07-111-1/+0 | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | Fixes to namespace-old.testbug_3606121dkf2016-07-10