Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
b28a03bf
...
b28a03bfa54c1ebc4473a4f360626eed3c9a5b2d
authored
2004-01-05 13:55:09 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(sieve_machine_destroy,sieve_machine_begin): Initialize and destroy source_list
1 parent
bd761b7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
libsieve/sieve.y
libsieve/sieve.y
View file @
b28a03b
...
...
@@ -496,20 +496,28 @@ sieve_machine_destroy (sieve_machine_t *pmach)
list_destroy (&mach->action_list);
list_destroy (&mach->test_list);
list_destroy (&mach->comp_list);
list_destroy (&mach->source_list);
sieve_slist_destroy (&mach->memory_pool);
free (mach);
*pmach = NULL;
}
/* FIXME: When posix thread support is added, sieve_machine_begin() should
acquire the global mutex, locking the current compilation session, and
sieve_machine_finish() should release it */
static int
string_comp (const void *item, const void *value)
{
return strcmp (item, value);
}
void
sieve_machine_begin (sieve_machine_t mach)
sieve_machine_begin (sieve_machine_t mach
, char *file
)
{
sieve_machine = mach;
sieve_error_count = 0;
sieve_code_instr (NULL);
list_create (&mach->source_list);
list_set_comparator (mach->source_list, string_comp);
sieve_register_standard_actions (mach);
sieve_register_standard_tests (mach);
sieve_register_standard_comparators (mach);
...
...
@@ -526,11 +534,10 @@ sieve_compile (sieve_machine_t mach, const char *name)
{
int rc;
sieve_machine_begin (mach);
sieve_machine_begin (mach
, name
);
if (sieve_lex_begin (name) == 0)
{
sieve_machine->filename = sieve_mstrdup (sieve_machine, name);
rc = yyparse ();
if (sieve_error_count)
rc = 1;
...
...
Please
register
or
sign in
to post a comment