summaryrefslogtreecommitdiffhomepage
path: root/lib/math.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-07-09 19:58:37 +0200
committerJo-Philipp Wich <jo@mein.io>2021-07-11 15:49:14 +0200
commitff52440341bcb8c61105ff144bfcb210315207e4 (patch)
treeb7eb1c47cb8034e5188b86f480e3e61f44ee6ced /lib/math.c
parent1d60418132460c23b216a2f8a9e0ea8897d32ea4 (diff)
treewide: consolidate typedef naming
Ensure that all custom typedef and vector declaration type names end with a "_t" suffix. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib/math.c')
-rw-r--r--lib/math.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/math.c b/lib/math.c
index bc8efb6..5ba8d76 100644
--- a/lib/math.c
+++ b/lib/math.c
@@ -22,7 +22,7 @@
static bool srand_called = false;
static uc_value_t *
-uc_abs(uc_vm *vm, size_t nargs)
+uc_abs(uc_vm_t *vm, size_t nargs)
{
uc_value_t *v = uc_get_arg(0);
uc_type_t t;
@@ -41,7 +41,7 @@ uc_abs(uc_vm *vm, size_t nargs)
}
static uc_value_t *
-uc_atan2(uc_vm *vm, size_t nargs)
+uc_atan2(uc_vm_t *vm, size_t nargs)
{
double d1 = uc_to_double(uc_get_arg(0));
double d2 = uc_to_double(uc_get_arg(1));
@@ -53,7 +53,7 @@ uc_atan2(uc_vm *vm, size_t nargs)
}
static uc_value_t *
-uc_cos(uc_vm *vm, size_t nargs)
+uc_cos(uc_vm_t *vm, size_t nargs)
{
double d = uc_to_double(uc_get_arg(0));
@@ -64,7 +64,7 @@ uc_cos(uc_vm *vm, size_t nargs)
}
static uc_value_t *
-uc_exp(uc_vm *vm, size_t nargs)
+uc_exp(uc_vm_t *vm, size_t nargs)
{
double d = uc_to_double(uc_get_arg(0));
@@ -75,7 +75,7 @@ uc_exp(uc_vm *vm, size_t nargs)
}
static uc_value_t *
-uc_log(uc_vm *vm, size_t nargs)
+uc_log(uc_vm_t *vm, size_t nargs)
{
double d = uc_to_double(uc_get_arg(0));
@@ -86,7 +86,7 @@ uc_log(uc_vm *vm, size_t nargs)
}
static uc_value_t *
-uc_sin(uc_vm *vm, size_t nargs)
+uc_sin(uc_vm_t *vm, size_t nargs)
{
double d = uc_to_double(uc_get_arg(0));
@@ -97,7 +97,7 @@ uc_sin(uc_vm *vm, size_t nargs)
}
static uc_value_t *
-uc_sqrt(uc_vm *vm, size_t nargs)
+uc_sqrt(uc_vm_t *vm, size_t nargs)
{
double d = uc_to_double(uc_get_arg(0));
@@ -108,7 +108,7 @@ uc_sqrt(uc_vm *vm, size_t nargs)
}
static uc_value_t *
-uc_pow(uc_vm *vm, size_t nargs)
+uc_pow(uc_vm_t *vm, size_t nargs)
{
double x = uc_to_double(uc_get_arg(0));
double y = uc_to_double(uc_get_arg(1));
@@ -120,7 +120,7 @@ uc_pow(uc_vm *vm, size_t nargs)
}
static uc_value_t *
-uc_rand(uc_vm *vm, size_t nargs)
+uc_rand(uc_vm_t *vm, size_t nargs)
{
struct timeval tv;
@@ -135,7 +135,7 @@ uc_rand(uc_vm *vm, size_t nargs)
}
static uc_value_t *
-uc_srand(uc_vm *vm, size_t nargs)
+uc_srand(uc_vm_t *vm, size_t nargs)
{
int64_t n = uc_to_int64(uc_get_arg(0));
@@ -145,7 +145,7 @@ uc_srand(uc_vm *vm, size_t nargs)
return NULL;
}
-static const uc_cfunction_list math_fns[] = {
+static const uc_cfunction_list_t math_fns[] = {
{ "abs", uc_abs },
{ "atan2", uc_atan2 },
{ "cos", uc_cos },
@@ -158,7 +158,7 @@ static const uc_cfunction_list math_fns[] = {
{ "srand", uc_srand },
};
-void uc_module_init(uc_vm *vm, uc_value_t *scope)
+void uc_module_init(uc_vm_t *vm, uc_value_t *scope)
{
uc_add_functions(scope, math_fns);
}