MCPcopy Create free account
hub / github.com/Tencent/xLua / PushDecimal

Method PushDecimal

Assets/XLua/Src/ObjectTranslator.cs:1645–1658  ·  view source on GitHub ↗
(RealStatePtr L, decimal val)

Source from the content-addressed store, hash-verified

1643 int decimal_type_id = -1;
1644
1645 public void PushDecimal(RealStatePtr L, decimal val)
1646 {
1647 if (decimal_type_id == -1)
1648 {
1649 bool is_first;
1650 decimal_type_id = getTypeId(L, typeof(decimal), out is_first);
1651 }
1652 IntPtr buff = LuaAPI.xlua_pushstruct(L, 16, decimal_type_id);
1653 if (!CopyByValue.Pack(buff, 0, val))
1654 {
1655 throw new Exception("pack fail for decimal ,value=" + val);
1656 }
1657
1658 }
1659
1660 public bool IsDecimal(RealStatePtr L, int index)
1661 {

Callers 1

tryPrimitiveArrayGetFunction · 0.80

Calls 2

xlua_pushstructMethod · 0.80
PackMethod · 0.80

Tested by

no test coverage detected