diff options
author | Chase McDermott <chasemcd1745@tamu.edu> | 2018-07-15 05:42:01 +0800 |
---|---|---|
committer | Chase McDermott <chasemcd1745@tamu.edu> | 2018-07-15 05:42:43 +0800 |
commit | 3267adcd14ba10e27a4b177e771fca9c9ab39646 (patch) | |
tree | 1c9b69f82d2af0e7eaf56b17188014b541b66ce8 /docs/contracts.rst | |
parent | 31e56f9f9976cee44f000226318dca566f0f0b79 (diff) | |
download | dexon-solidity-3267adcd14ba10e27a4b177e771fca9c9ab39646.tar.gz dexon-solidity-3267adcd14ba10e27a4b177e771fca9c9ab39646.tar.zst dexon-solidity-3267adcd14ba10e27a4b177e771fca9c9ab39646.zip |
Added default data locations to docs and other external tests.
Diffstat (limited to 'docs/contracts.rst')
-rw-r--r-- | docs/contracts.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst index fa6df6bf..ea41cb54 100644 --- a/docs/contracts.rst +++ b/docs/contracts.rst @@ -1295,12 +1295,12 @@ custom types without the overhead of external function calls: uint[] limbs; } - function fromUint(uint x) internal pure returns (bigint r) { + function fromUint(uint x) internal pure returns (bigint memory r) { r.limbs = new uint[](1); r.limbs[0] = x; } - function add(bigint _a, bigint _b) internal pure returns (bigint r) { + function add(bigint memory _a, bigint memory _b) internal pure returns (bigint memory r) { r.limbs = new uint[](max(_a.limbs.length, _b.limbs.length)); uint carry = 0; for (uint i = 0; i < r.limbs.length; ++i) { @@ -1323,7 +1323,7 @@ custom types without the overhead of external function calls: } } - function limb(bigint _a, uint _limb) internal pure returns (uint) { + function limb(bigint memory _a, uint _limb) internal pure returns (uint) { return _limb < _a.limbs.length ? _a.limbs[_limb] : 0; } |