summaryrefslogtreecommitdiffstats
path: root/src/lua/lua_rsa.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-08-17 17:15:16 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-08-17 17:15:16 +0100
commitdf48f709f804739d1b084174c46af04b10d2fede (patch)
tree2bb3270a4db81104bfd3c8abf9b19381e5d926b4 /src/lua/lua_rsa.c
parentac1dfb0beccf74a9f3ec82dfc257ea326532370d (diff)
downloadrspamd-df48f709f804739d1b084174c46af04b10d2fede.tar.gz
rspamd-df48f709f804739d1b084174c46af04b10d2fede.zip
Rework lua function names to avoid ambiguity.
Diffstat (limited to 'src/lua/lua_rsa.c')
-rw-r--r--src/lua/lua_rsa.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lua/lua_rsa.c b/src/lua/lua_rsa.c
index 40eab8358..c06b14f3f 100644
--- a/src/lua/lua_rsa.c
+++ b/src/lua/lua_rsa.c
@@ -66,7 +66,7 @@ static const struct luaL_reg rsapubkeylib_f[] = {
};
static const struct luaL_reg rsapubkeylib_m[] = {
- {"__tostring", lua_class_tostring},
+ {"__tostring", rspamd_lua_class_tostring},
{"__gc", lua_rsa_pubkey_gc},
{NULL, NULL}
};
@@ -78,7 +78,7 @@ static const struct luaL_reg rsaprivkeylib_f[] = {
};
static const struct luaL_reg rsaprivkeylib_m[] = {
- {"__tostring", lua_class_tostring},
+ {"__tostring", rspamd_lua_class_tostring},
{"__gc", lua_rsa_privkey_gc},
{NULL, NULL}
};
@@ -91,7 +91,7 @@ static const struct luaL_reg rsasignlib_f[] = {
static const struct luaL_reg rsasignlib_m[] = {
LUA_INTERFACE_DEF (rsa_signature, save),
- {"__tostring", lua_class_tostring},
+ {"__tostring", rspamd_lua_class_tostring},
{"__gc", lua_rsa_signature_gc},
{NULL, NULL}
};
@@ -147,7 +147,7 @@ lua_rsa_pubkey_load (lua_State *L)
}
else {
prsa = lua_newuserdata (L, sizeof (RSA *));
- lua_setclass (L, "rspamd{rsa_pubkey}", -1);
+ rspamd_lua_setclass (L, "rspamd{rsa_pubkey}", -1);
*prsa = rsa;
}
fclose (f);
@@ -177,7 +177,7 @@ lua_rsa_pubkey_create (lua_State *L)
}
else {
prsa = lua_newuserdata (L, sizeof (RSA *));
- lua_setclass (L, "rspamd{rsa_pubkey}", -1);
+ rspamd_lua_setclass (L, "rspamd{rsa_pubkey}", -1);
*prsa = rsa;
}
BIO_free (bp);
@@ -224,7 +224,7 @@ lua_rsa_privkey_load (lua_State *L)
}
else {
prsa = lua_newuserdata (L, sizeof (RSA *));
- lua_setclass (L, "rspamd{rsa_privkey}", -1);
+ rspamd_lua_setclass (L, "rspamd{rsa_privkey}", -1);
*prsa = rsa;
}
fclose (f);
@@ -254,7 +254,7 @@ lua_rsa_privkey_create (lua_State *L)
}
else {
prsa = lua_newuserdata (L, sizeof (RSA *));
- lua_setclass (L, "rspamd{rsa_privkey}", -1);
+ rspamd_lua_setclass (L, "rspamd{rsa_privkey}", -1);
*prsa = rsa;
}
BIO_free (bp);
@@ -309,7 +309,7 @@ lua_rsa_signature_load (lua_State *L)
sig->begin = g_malloc (sig->len);
memcpy (sig->begin, data, sig->len);
psig = lua_newuserdata (L, sizeof (f_str_t *));
- lua_setclass (L, "rspamd{rsa_signature}", -1);
+ rspamd_lua_setclass (L, "rspamd{rsa_signature}", -1);
*psig = sig;
munmap (data, st.st_size);
}
@@ -387,7 +387,7 @@ lua_rsa_signature_create (lua_State *L)
sig->begin = g_malloc (sig->len);
memcpy (sig->begin, data, sig->len);
psig = lua_newuserdata (L, sizeof (f_str_t *));
- lua_setclass (L, "rspamd{rsa_signature}", -1);
+ rspamd_lua_setclass (L, "rspamd{rsa_signature}", -1);
*psig = sig;
}
@@ -557,7 +557,7 @@ lua_rsa_sign_memory (lua_State *L)
}
else {
psig = lua_newuserdata (L, sizeof (f_str_t *));
- lua_setclass (L, "rspamd{rsa_signature}", -1);
+ rspamd_lua_setclass (L, "rspamd{rsa_signature}", -1);
*psig = signature;
}
g_free (data_sig);
@@ -625,7 +625,7 @@ lua_rsa_sign_file (lua_State *L)
}
else {
psig = lua_newuserdata (L, sizeof (f_str_t *));
- lua_setclass (L, "rspamd{rsa_signature}", -1);
+ rspamd_lua_setclass (L, "rspamd{rsa_signature}", -1);
*psig = signature;
}
g_free (data_sig);