Created
October 28, 2019 17:48
-
-
Save kirs/bc6215a358578d6f4e395a2dcab4ccc5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int deserialize_String_vector(struct iarchive *in, const char *tag, struct String_vector *v) | |
{ | |
int rc = 0; | |
int32_t i; | |
rc = in->start_vector(in, tag, &v->count); | |
v->data = calloc(v->count, sizeof(*v->data)); | |
for(i=0;i<v->count;i++) { | |
rc = rc ? rc : in->deserialize_String(in, "value", &v->data[i]); | |
} | |
rc = in->end_vector(in, tag); | |
return rc; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment