Exemplo n.º 1
0
static VALUE mTokyoMessenger_setmst(VALUE vself, VALUE vhost, VALUE vport, VALUE vts, VALUE vopts){
  uint64_t ts;
  int opts;
  TCRDB *db = mTokyoMessenger_getdb(vself);

  ts = (uint64_t) FIX2INT(vts);
  opts = FIX2INT(vopts);
  return tcrdbsetmst(db, RSTRING_PTR(vhost), FIX2INT(vport), ts, opts) ? Qtrue : Qfalse;
}
Exemplo n.º 2
0
static int
rdb_setmst(lua_State *L){
	TCRDB *rdb = rdb_getrdb(L, 1);
	const char *host = luaL_checkstring(L, 2);
	int port = luaL_checkinteger(L, 3);
	uint64_t tstamp = (uint64_t)luaL_checkinteger(L, 4); // x_x
	int opts = luaL_optint(L, 5, 0);
	lua_pushboolean(L, tcrdbsetmst(rdb, host, port, tstamp, opts));
	return 1;
}