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

Support canonicalizing interface pointers. #220

Merged
merged 1 commit into from
Jan 24, 2022

Conversation

zenhack
Copy link
Contributor

@zenhack zenhack commented Jan 23, 2022

This is consistent with what the C++ and Haskell implementations do;
rather than failing, simply copy the index.


I need this for something I'm working on where I separately serialize a CapTable to disk, and then store a canoniclized structure like:

struct Stored(T) {
  value @0 :T;
  caps @1 :List(StoredCap);
}

...such that upon reading back the data I can reconstruct the CapTable from the caps field -- but I need to be able to retain interface pointers inside value when canonicalizing.

This is consistent with what the C++ and Haskell implementations do;
rather than failing, simply copy the index.
@lthibault lthibault merged commit 97f7281 into capnproto:main Jan 24, 2022
@zenhack zenhack deleted the canonicalize-interface branch January 24, 2022 21:30
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