void msgpack_pack(Packer& pk) const {
    int n = lua_gettop(L);
    if (arg_base_ > n) {
      if (pack_as_array_) pk.pack_array(0);
      return;
    }

    // If pack_as_array is true, all elements in the stack
    // will be serialized into an array. Otherwise,
    // each element will be serialized independently.
    if (pack_as_array_) pk.pack_array(n - arg_base_ + 1);
    for (int i = arg_base_; i <= n; i++) {
      pack(pk, i);
    }
  }
Example #2
0
	void msgpack_pack(Packer& _Pk) const {
		_Pk.pack_array(4);
		_Pk.pack(key);
		_Pk.pack(ovalue);
		_Pk.pack(nvalue);
		_Pk.pack(xt);
	}
  void packTableAsArray(Packer& pk, int index) const {
    int n = lua_gettop(L);
    size_t len = lua_objlen(L, index);

    pk.pack_array(len);
    for (size_t i = 1; i <= len; i++) {
      lua_rawgeti(L, index, i);
      pack(pk, n + 1);
      lua_pop(L, 1);
    }
  }
Example #4
0
 void msgpack_pack(Packer& pk) const
 {
     pk.pack_array(0);
 }
Example #5
0
    void msgpack_pack(Packer& pk) const
    {
        pk.pack_array(sizeof...(Args));

        define_imp<std::tuple<Args&...>, sizeof...(Args)>::pack(pk, a);
    }
Example #6
0
	void msgpack_pack(Packer& _Pk) const {
		_Pk.pack_array(2);
		_Pk.pack(login);
		_Pk.pack(passw);
	}
Example #7
0
	void msgpack_pack(Packer& _Pk) const {
		_Pk.pack_array(0);
	}
Example #8
0
	void msgpack_pack(Packer& _Pk) const {
		_Pk.pack_array(2);
		_Pk.pack(regex);
		_Pk.pack(max);
	}
Example #9
0
	void msgpack_pack(Packer& _Pk) const {
		_Pk.pack_array(2);
		_Pk.pack(prefix);
		_Pk.pack(max);
	}
Example #10
0
	void msgpack_pack(Packer& _Pk) const {
		_Pk.pack_array(1);
		_Pk.pack(key);
	}