Actually inline strbuf_get
This commit is contained in:
parent
c3fe5e80ac
commit
95ae54fd08
2 changed files with 6 additions and 7 deletions
|
|
@ -47,9 +47,3 @@ UINT32 strbuf_append(strbuf_t **strbuf, const char *str)
|
|||
strcpy(buf->buf - sizeof(UINT32) + oldsize, str);
|
||||
return oldsize;
|
||||
}
|
||||
|
||||
// returns the string at the given offset
|
||||
char *strbuf_get(strbuf_t *strbuf, UINT32 ofs)
|
||||
{
|
||||
return strbuf->buf - sizeof(UINT32) + ofs;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,12 @@ struct strbuf_t
|
|||
|
||||
strbuf_t *strbuf_alloc(void);
|
||||
UINT32 strbuf_append(strbuf_t **strbuf, const char *str);
|
||||
char *strbuf_get(strbuf_t *strbuf, UINT32 ofs);
|
||||
|
||||
// returns the string at the given offset
|
||||
FUNCINLINE static ATTRINLINE char *strbuf_get(strbuf_t *strbuf, UINT32 ofs)
|
||||
{
|
||||
return (char *)strbuf + ofs;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue