Lines Matching refs:buf
18 DUK_INTERNAL void duk_hbuffer_resize(duk_hthread *thr, duk_hbuffer_dynamic *buf, duk_size_t new_siz… in duk_hbuffer_resize() argument
23 DUK_ASSERT(buf != NULL); in duk_hbuffer_resize()
24 DUK_ASSERT(DUK_HBUFFER_HAS_DYNAMIC(buf)); in duk_hbuffer_resize()
25 DUK_ASSERT(!DUK_HBUFFER_HAS_EXTERNAL(buf)); in duk_hbuffer_resize()
41 res = DUK_REALLOC_INDIRECT(thr->heap, duk_hbuffer_get_dynalloc_ptr, (void *) buf, new_size); in duk_hbuffer_resize()
46 (void *) DUK_HBUFFER_DYNAMIC_GET_DATA_PTR(thr->heap, buf), in duk_hbuffer_resize()
47 (long) DUK_HBUFFER_DYNAMIC_GET_SIZE(buf), in duk_hbuffer_resize()
57 prev_size = DUK_HBUFFER_DYNAMIC_GET_SIZE(buf); in duk_hbuffer_resize()
66 DUK_HBUFFER_DYNAMIC_SET_SIZE(buf, new_size); in duk_hbuffer_resize()
67 DUK_HBUFFER_DYNAMIC_SET_DATA_PTR(thr->heap, buf, res); in duk_hbuffer_resize()
75 DUK_INTERNAL void duk_hbuffer_reset(duk_hthread *thr, duk_hbuffer_dynamic *buf) { in duk_hbuffer_reset() argument
77 DUK_ASSERT(buf != NULL); in duk_hbuffer_reset()
78 DUK_ASSERT(DUK_HBUFFER_HAS_DYNAMIC(buf)); in duk_hbuffer_reset()
79 DUK_ASSERT(!DUK_HBUFFER_HAS_EXTERNAL(buf)); in duk_hbuffer_reset()
81 duk_hbuffer_resize(thr, buf, 0); in duk_hbuffer_reset()