diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2017-03-14 17:25:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-14 17:25:13 -0700 |
commit | 6507e1fee39ce56718320a474ba0b2fa8267c9d1 (patch) | |
tree | ee51458187a04e4696672618f0014f1988684ace /upb/descriptor | |
parent | e35c38fc6535f811ca405e35c1271efc28f511b3 (diff) | |
parent | 4169481438e27bd548b9e759664343006a92710d (diff) |
Merge pull request #81 from TeBoring/master
Fix bugs in file_onphpprefix
Diffstat (limited to 'upb/descriptor')
-rw-r--r-- | upb/descriptor/reader.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/upb/descriptor/reader.c b/upb/descriptor/reader.c index 106d4a7..af3f83d 100644 --- a/upb/descriptor/reader.c +++ b/upb/descriptor/reader.c @@ -246,9 +246,10 @@ static size_t file_onphpprefix(void *closure, const void *hd, const char *buf, UPB_UNUSED(handle); prefix = upb_gstrndup(buf, n); - ok = upb_filedef_setpackage(r->file, prefix, NULL); + ok = upb_filedef_setphpprefix(r->file, prefix, NULL); + upb_gfree(prefix); UPB_ASSERT(ok); - return true; + return n; } static size_t file_onsyntax(void *closure, const void *hd, const char *buf, |