diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2011-09-04 19:29:36 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2011-09-04 19:29:36 -0700 |
commit | 621c0cdcb5efc4f7c2382031becded018ef0b62b (patch) | |
tree | d6af78ef0872c9db0f48c99e6c93b8d4c43fa689 /upb/upb.c | |
parent | 8f2758dda2ba12b78ae8f8c7170decc5e88dd28c (diff) |
Const invasion: large parts of upb made const-correct.
Diffstat (limited to 'upb/upb.c')
-rw-r--r-- | upb/upb.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -87,7 +87,10 @@ void upb_status_copy(upb_status *to, upb_status *from) { } } -const char *upb_status_getstr(upb_status *status) { +const char *upb_status_getstr(const upb_status *_status) { + // Function is logically const but can modify internal state to materialize + // the string. + upb_status *status = (upb_status*)_status; if (status->str == NULL && status->space && status->space->code_to_string) { status->space->code_to_string(status->code, status->buf, status->bufsize); status->str = status->buf; |