Navigation Menu

Skip to content

Commit

Permalink
Stop to use declaration after expression
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Feb 5, 2018
1 parent 85fd846 commit 1670b34
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions plugins/functions/math.c
@@ -1,6 +1,6 @@
/* -*- c-basic-offset: 2 -*- */
/*
Copyright(C) 2017 Brazil
Copyright(C) 2017-2018 Brazil
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -65,16 +65,18 @@ func_math_abs(grn_ctx *ctx, int n_args, grn_obj **args,
} \
setter(ctx, grn_abs_number, getter(number)); \
}
#define ABS_CONVERT_TYPE(func, return_type, to_type, getter, setter) { \
grn_abs_number = grn_plugin_proc_alloc(ctx, \
user_data, \
(return_type), \
0); \
if (!grn_abs_number) { \
return NULL; \
} \
to_type abs_number_raw = (to_type)(func)(getter(number)); \
setter(ctx, grn_abs_number, abs_number_raw); \
#define ABS_CONVERT_TYPE(func, return_type, to_type, getter, setter) { \
grn_abs_number = grn_plugin_proc_alloc(ctx, \
user_data, \
(return_type), \
0); \
if (!grn_abs_number) { \
return NULL; \
} \
{ \
to_type abs_number_raw = (to_type)(func)(getter(number)); \
setter(ctx, grn_abs_number, abs_number_raw); \
} \
}

switch (number->header.domain) {
Expand Down Expand Up @@ -110,7 +112,7 @@ func_math_abs(grn_ctx *ctx, int n_args, grn_obj **args,
}
#undef ABS_CONVERT_TYPE
#undef ABS_AS_IS

return grn_abs_number;
}

Expand Down

0 comments on commit 1670b34

Please sign in to comment.