Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %module freeswitch
- %{
- #include "freeswitch_lua.h"
- %}
- %typemap(in, checkfn = "lua_isfunction") SWIGLUA_FN {
- $1.L = L;
- $1.idx = $input;
- }
- %typemap(default) SWIGLUA_FN {
- SWIGLUA_FN default_swiglua_fn = { 0 };
- $1 = default_swiglua_fn;
- }
- %typemap(typecheck) SWIGLUA_FN {
- $1 = lua_isfunction(L, $input);
- }
- %typemap(in, checkfn = "lua_istable") SWIGLUA_TABLE {
- $1.L = L;
- $1.idx = $input;
- }
- %typemap(default) SWIGLUA_TABLE {
- SWIGLUA_TABLE default_swiglua_table = { 0 };
- $1 = default_swiglua_table;
- }
- %typemap(typecheck) SWIGLUA_TABLE {
- $1 = lua_istable(L, $input);
- }
- class Dbh {
- public:
- Dbh(char *dsn, char *user = NULL, char *pass = NULL);
- bool query(char *sql, SWIGLUA_FN lua_fun);
- bool query(char *sql, SWIGLUA_TABLE lua_params);
- bool query(char *sql, SWIGLUA_TABLE lua_params, SWIGLUA_FN lua_fun);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement