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

isSame fails if std::string has a different size #95

Open
jmachowinski opened this issue May 17, 2017 · 1 comment
Open

isSame fails if std::string has a different size #95

jmachowinski opened this issue May 17, 2017 · 1 comment

Comments

@jmachowinski
Copy link
Member

Hey,
isSame fails if std::string changed size.
The fix seems to be to ignore the size check in case
of a container. If you agree, I'll prepare a patch.

@doudou
Copy link
Contributor

doudou commented May 17, 2017

isSame should (and does) return false if the type descriptions are different. The underlying implementation detail that in the case of C++ and in some conditions, it's fine to unmarshal data that was generated from a certain type into a different type is just this: a pocolog/C++ implementation detail that should definitely not pollute the underlying model.

The right fix is to make sure the types match. Which is what the ruby pocolog implementation does in case of containers - detect this condition. That is, that it's fine to unmarshal a certain type definition into a different one, and feed the marshalled data to the local C++ type for unmarshalling.

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

No branches or pull requests

2 participants