dbd/mysql/connection.c

changeset 14
98192b7d4e89
parent 13
10c8c6f0da14
child 22
fd78e9cdc6e9
equal deleted inserted replaced
13:10c8c6f0da14 14:98192b7d4e89
32 password = luaL_checkstring(L, 3); 32 password = luaL_checkstring(L, 3);
33 case 2: 33 case 2:
34 if (lua_isnil(L, 2) == 0) 34 if (lua_isnil(L, 2) == 0)
35 user = luaL_checkstring(L, 2); 35 user = luaL_checkstring(L, 2);
36 case 1: 36 case 1:
37 if (lua_isnil(L, 1) == 0) 37 /*
38 db = luaL_checkstring(L, 1); 38 * db is the only mandatory parameter
39 */
40 db = luaL_checkstring(L, 1);
39 } 41 }
40 42
41 conn = (connection_t *)lua_newuserdata(L, sizeof(connection_t)); 43 conn = (connection_t *)lua_newuserdata(L, sizeof(connection_t));
42 44
43 conn->mysql = mysql_init(NULL); 45 conn->mysql = mysql_init(NULL);

mercurial