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 Bugs with emit_bare_values #313

Merged
merged 4 commits into from
Dec 8, 2023
Merged

Fix Bugs with emit_bare_values #313

merged 4 commits into from
Dec 8, 2023

Conversation

rmarrowstone
Copy link
Contributor

@rmarrowstone rmarrowstone commented Dec 6, 2023

This change makes it so that the emit_bare_values flag to the
load_extension() method actually works. It does not plumb the
flag up to the user APIs.

Specifically:

  • Bare Decimals are correctly emitted instead of tuples
  • Values within a non-bare Sexp may now be bare themselves
  • None is correctly Increffed when emitted as a bare value

I also patched a leak with ION_DECIMALs where the read decimal
was not being freed.

PR Note:
I'd like to see us expand what we emit as std python values, as I think
it will yield solid performance gains and I don't think most folks will
miss the "ion-ness". But... "most" is not "all" so I think we will need a
set of flags to allow users to specify where they sacrifice fidelity for
speed and convenience.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This change makes it so that the emit_bare_values flag to the
load_extension() method actually works. It does not plumb the
flag up to the user APIs.

Specifically:
* Bare Decimals are correctly emitted instead of tuples
* Values within a non-bare Sexp may now be bare themselves
* None is correctly Increffed when emitted as a bare value

I also patched a leak with ION_DECIMALs where the read decimal
was not being freed.
@rmarrowstone rmarrowstone marked this pull request as ready for review December 6, 2023 16:44
Copy link
Contributor

@tgregg tgregg left a comment

Choose a reason for hiding this comment

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

Looks good to me

@rmarrowstone rmarrowstone merged commit cc8aac3 into master Dec 8, 2023
@rmarrowstone rmarrowstone deleted the emit_bare_values branch December 8, 2023 23:05
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.

2 participants