Skip to content
Snippets Groups Projects
Commit 9222ce45 authored by Stephan Bosch's avatar Stephan Bosch
Browse files

lib-sieve: sieve-ast - Use sieve_number_t for number values.

parent efdb74cf
No related branches found
No related tags found
No related merge requests found
......@@ -585,7 +585,7 @@ void sieve_ast_argument_string_setc(struct sieve_ast_argument *argument,
}
void sieve_ast_argument_number_substitute(struct sieve_ast_argument *argument,
unsigned int number)
sieve_number_t number)
{
argument->type = SAAT_NUMBER;
argument->_value.number = number;
......@@ -714,7 +714,8 @@ sieve_ast_argument_tag_insert(struct sieve_ast_argument *before,
struct sieve_ast_argument *
sieve_ast_argument_number_create(struct sieve_ast_node *node,
unsigned int number, unsigned int source_line)
sieve_number_t number,
unsigned int source_line)
{
struct sieve_ast_argument *argument =
sieve_ast_argument_create(node->ast, source_line);
......@@ -728,7 +729,7 @@ sieve_ast_argument_number_create(struct sieve_ast_node *node,
}
void sieve_ast_argument_number_set(struct sieve_ast_argument *argument,
unsigned int newnum)
sieve_number_t newnum)
{
i_assert(argument->type == SAAT_NUMBER);
argument->_value.number = newnum;
......@@ -993,7 +994,8 @@ sieve_ast_unparse_argument(struct sieve_ast_argument *argument, int level)
sieve_ast_unparse_stringlist(argument, level+1);
break;
case SAAT_NUMBER:
printf("%d", sieve_ast_argument_number(argument));
printf("%"SIEVE_PRI_NUMBER,
sieve_ast_argument_number(argument));
break;
case SAAT_TAG:
printf(":%s", sieve_ast_argument_tag(argument));
......
......@@ -93,7 +93,7 @@ struct sieve_ast_argument {
string_t *str;
struct sieve_ast_arg_list *strlist;
const char *tag;
unsigned int number;
sieve_number_t number;
} _value;
unsigned int source_line;
......@@ -251,7 +251,8 @@ sieve_ast_argument_tag_create(struct sieve_ast_node *node, const char *tag,
struct sieve_ast_argument *
sieve_ast_argument_number_create(struct sieve_ast_node *node,
unsigned int number, unsigned int source_line);
sieve_number_t number,
unsigned int source_line);
void sieve_ast_argument_string_set(struct sieve_ast_argument *argument,
string_t *newstr);
......@@ -259,9 +260,9 @@ void sieve_ast_argument_string_setc(struct sieve_ast_argument *argument,
const char *newstr);
void sieve_ast_argument_number_set(struct sieve_ast_argument *argument,
unsigned int newnum);
sieve_number_t newnum);
void sieve_ast_argument_number_substitute(struct sieve_ast_argument *argument,
unsigned int number);
sieve_number_t number);
struct sieve_ast_argument *
sieve_ast_argument_tag_insert(struct sieve_ast_argument *before,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.