aboutsummaryrefslogtreecommitdiff
path: root/docs/source
diff options
context:
space:
mode:
authorClément Julliard <clju@google.com>2019-04-24 10:34:21 -0700
committerWouter van Oortmerssen <aardappel@gmail.com>2019-04-24 10:34:21 -0700
commitb72a75f87dd6543b5d05a812dfddd264e953408c (patch)
treed0eb7cd87c890e789d2d44037df196cb2fbb4c1e /docs/source
parent6cfcd8628a72284d500f453af0f1d4d3e1cfaef8 (diff)
downloadflatbuffers-b72a75f87dd6543b5d05a812dfddd264e953408c.tar.gz
Doc: use correct ref types for flatcc string creation. (#5305)
Some string definitions were typed as ns(Weapon_ref_t) while they should be flatbuffers_string_ref_t. Note that the former was also compiling & running correctly as both ref types boil down to the same underlying ref type.
Diffstat (limited to 'docs/source')
-rw-r--r--docs/source/Tutorial.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/source/Tutorial.md b/docs/source/Tutorial.md
index 72b49a0e..e23068b6 100644
--- a/docs/source/Tutorial.md
+++ b/docs/source/Tutorial.md
@@ -735,10 +735,10 @@ our `orc` Monster, lets create some `Weapon`s: a `Sword` and an `Axe`.
</div>
<div class="language-c">
~~~{.c}
- ns(Weapon_ref_t) weapon_one_name = flatbuffers_string_create_str(B, "Sword");
+ flatbuffers_string_ref_t weapon_one_name = flatbuffers_string_create_str(B, "Sword");
uint16_t weapon_one_damage = 3;
- ns(Weapon_ref_t) weapon_two_name = flatbuffers_string_create_str(B, "Axe");
+ flatbuffers_string_ref_t weapon_two_name = flatbuffers_string_create_str(B, "Axe");
uint16_t weapon_two_damage = 5;
ns(Weapon_ref_t) sword = ns(Weapon_create(B, weapon_one_name, weapon_one_damage));