diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2018-12-05 18:30:47 -0500 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2018-12-05 18:30:47 -0500 |
| commit | ea5f2d56933d04975ef34b85372a577ad433950f (patch) | |
| tree | 8a9c31029e4216f8229d11bade823ac214658119 /src | |
| parent | 03d363a337eea7fce725efbd51f99449e06395ef (diff) | |
| download | libctemplates-ea5f2d56933d04975ef34b85372a577ad433950f.tar.gz libctemplates-ea5f2d56933d04975ef34b85372a577ad433950f.tar.bz2 libctemplates-ea5f2d56933d04975ef34b85372a577ad433950f.zip | |
Allow bstringify to accept a null size
Allow bstringify (and therefore TMPL_render()) to accept NULL
as the size. When NULL is passed as the size, the size of the
resulting string is not stored anywhere.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fbuf.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -115,7 +115,8 @@ char* bstringify(struct TMPL_buf* b, size_t* size){ b->head = single; b->tail = single; - *size = b->total_len; + if(size != NULL) + *size = b->total_len; return single->data; } |
