From 2ac51a1a9026f1ae451e030c70aa3be9f0da83e8 Mon Sep 17 00:00:00 2001 From: James Ray Date: Fri, 30 Jun 2017 19:11:21 +1000 Subject: [PATCH 1/4] Added links for the getter function. --- docs/types.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/types.rst b/docs/types.rst index dfab79c8b..52d07be82 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -557,7 +557,7 @@ So ``bytes`` should always be preferred over ``byte[]`` because it is cheaper. that you are accessing the low-level bytes of the UTF-8 representation, and not the individual characters! -It is possible to mark arrays ``public`` and have Solidity create a getter. +It is possible to mark arrays ``public`` and have Solidity create a _`[getter](https://solidity.readthedocs.io/en/develop/contracts.html#getter-functions)`_. The numeric index will become a required parameter for the getter. .. index:: ! array;allocating, new @@ -806,7 +806,7 @@ Because of this, mappings do not have a length or a concept of a key or value be Mappings are only allowed for state variables (or as storage reference types in internal functions). -It is possible to mark mappings ``public`` and have Solidity create a getter. +It is possible to mark mappings ``public`` and have Solidity create a `_getter `. The ``_KeyType`` will become a required parameter for the getter and it will return ``_ValueType``. From 355d69b4ba1d8cca4b264f4878c094e422135b8c Mon Sep 17 00:00:00 2001 From: James Ray Date: Fri, 30 Jun 2017 19:19:06 +1000 Subject: [PATCH 2/4] Used a ref for getter instead of a URL. --- docs/types.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/types.rst b/docs/types.rst index 52d07be82..ea8b0e183 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -557,7 +557,7 @@ So ``bytes`` should always be preferred over ``byte[]`` because it is cheaper. that you are accessing the low-level bytes of the UTF-8 representation, and not the individual characters! -It is possible to mark arrays ``public`` and have Solidity create a _`[getter](https://solidity.readthedocs.io/en/develop/contracts.html#getter-functions)`_. +It is possible to mark arrays ``public`` and have Solidity create a :ref:`getters `. The numeric index will become a required parameter for the getter. .. index:: ! array;allocating, new From 77e4f9c8fc5bb9e9adfde4ed1f59292852eb2ced Mon Sep 17 00:00:00 2001 From: James Ray Date: Fri, 30 Jun 2017 19:24:39 +1000 Subject: [PATCH 3/4] Changed URL for getter to a ref --- docs/types.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/types.rst b/docs/types.rst index ea8b0e183..7fcec508c 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -806,7 +806,7 @@ Because of this, mappings do not have a length or a concept of a key or value be Mappings are only allowed for state variables (or as storage reference types in internal functions). -It is possible to mark mappings ``public`` and have Solidity create a `_getter `. +It is possible to mark mappings ``public`` and have Solidity create a :ref:`getters `. The ``_KeyType`` will become a required parameter for the getter and it will return ``_ValueType``. From 3594f973dffc8216e7ba9687d74a65102b112bd4 Mon Sep 17 00:00:00 2001 From: James Ray Date: Sat, 1 Jul 2017 13:31:31 +1000 Subject: [PATCH 4/4] Update types.rst --- docs/types.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/types.rst b/docs/types.rst index 7fcec508c..ddf96c367 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -557,7 +557,7 @@ So ``bytes`` should always be preferred over ``byte[]`` because it is cheaper. that you are accessing the low-level bytes of the UTF-8 representation, and not the individual characters! -It is possible to mark arrays ``public`` and have Solidity create a :ref:`getters `. +It is possible to mark arrays ``public`` and have Solidity create a :ref:`getter `. The numeric index will become a required parameter for the getter. .. index:: ! array;allocating, new @@ -806,7 +806,7 @@ Because of this, mappings do not have a length or a concept of a key or value be Mappings are only allowed for state variables (or as storage reference types in internal functions). -It is possible to mark mappings ``public`` and have Solidity create a :ref:`getters `. +It is possible to mark mappings ``public`` and have Solidity create a :ref:`getter `. The ``_KeyType`` will become a required parameter for the getter and it will return ``_ValueType``.