Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed length arrays #3987

Closed
wants to merge 8 commits into from
Closed

Conversation

daksenik
Copy link
Contributor

Added support of arrays with fixed length within structs for C++ (described in #63).
It doesn't work good enough with JSON and when the builder is created from JSON the space in buffer allocated for array is filled by 0-s instead of real array values (line 886 in changes to idl_parser.cpp). I can create common stack for fixed-length arrays in Parser class, but I think it isn't good idea.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@idoroshev
Copy link

I agree with using my commits in this PR.

@ghost
Copy link

ghost commented Aug 12, 2016

This is a rather cool feature to add.

It is also a somewhat dangerous feature, as it adds an entirely new type. Unless you're catching all locations in all code generators where it is doing something with types, this commit potentially introduces bugs.

We'd need to add code generation for all languages.

@@ -20,6 +20,7 @@ enum BaseType : byte {
ULong,
Float,
Double,
Array,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding it in the middle rather than at the end will break all reflection files out there.

@ghost ghost force-pushed the master branch 9 times, most recently from 6b53b21 to 9241fcf Compare December 13, 2016 01:29
@ghost ghost force-pushed the master branch 5 times, most recently from 48a7fb3 to 2a7a44b Compare December 13, 2016 02:02
@aardappel
Copy link
Collaborator

Status?

@ghost
Copy link

ghost commented Aug 11, 2017

I'm going to close this for now due to inactivity.. feel free to reopen when you have time to re-visit.

@ghost ghost closed this Aug 11, 2017
svenk177 added a commit to svenk177/flatbuffers that referenced this pull request Apr 30, 2019
@svenk177 svenk177 mentioned this pull request Apr 30, 2019
svenk177 added a commit to svenk177/flatbuffers that referenced this pull request May 3, 2019
svenk177 added a commit to svenk177/flatbuffers that referenced this pull request May 15, 2019
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants