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

Generate marshalers for structs #2522

Merged
merged 11 commits into from
Apr 9, 2020
Merged

Generate marshalers for structs #2522

merged 11 commits into from
Apr 9, 2020

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Apr 9, 2020

Makes it possible to pass UTF-8 strings in structs. Also fixed a typo in marshaller marshaler. Tested with the following blueprint file in RSS:

principia_numerics_blueprint:NEEDS[RealSolarSystem] {
  ephemeris {
    ...
    fitting_tolerance = 1000 μm
    ...
  }
  history {
    ...
  }
  psychohistory {
    ...
    length_integration_tolerance = 10000000 Å
    ...
  }
}

As usual there are special commits showing the generated files before/after.

Another step towards solving #2433

@@ -105,6 +105,8 @@ inline Unit ParseUnit(std::string const& s) {
if (s == "") {
return Unit(1.0);
// Units of length.
} else if (s == u8"Å") {
return Unit(100 * si::Pico(si::Metre));
Copy link
Member

Choose a reason for hiding this comment

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

Use Ångström:

constexpr Length Ångström = 1e-10 * si::Metre;

Sorry, something went wrong.

@eggrobin eggrobin added the LGTM label Apr 9, 2020
@pleroy pleroy merged commit 8e73af9 into mockingbirdnest:master Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants