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

Fix constants generated in case of parent: false in Lua, Python and Ruby #235

Merged
merged 1 commit into from Feb 5, 2022

Conversation

Mingun
Copy link
Contributor

@Mingun Mingun commented Nov 28, 2021

  • lua: false -> nil
  • python: False -> None
  • ruby: false -> nil

Perl probably also affected by this but I don't known what to use instead of 0

…d Ruby

- lua: false -> nil
- python: False -> None
- ruby: false -> nil

Perl probably also affected by this but I don't known what to use instead of `0`
Copy link
Contributor

@dgelessus dgelessus left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks!

For Perl, my guess is that undef would be the right choice. That seems to be the closest thing to "null" that Perl has, and I think it's also what parent would be set to if you create a struct object without a parent. I don't know Perl very well though, so I'm not confident enough to make that change myself.

The fixes for the other affected languages are good, so I'll go ahead and merge this as-is. I'll leave the Perl fix to someone who knows the language better than I do :)

@dgelessus dgelessus merged commit 85b8c89 into kaitai-io:master Feb 5, 2022
@Mingun Mingun deleted the fix-parent-false branch February 5, 2022 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants