def resize_return_buffer(buf_, size_):
    '  callback function that resizes return buffer when it is too small\n  Args:\n  size_: size the return buffer needs to be\n  '
    try:
        if (not tls_var.buf):
            tls_var.buf = create_string_buffer(size_)
            tls_var.bufSize = size_
        elif (tls_var.bufSize < size_):
            foo = tls_var.buf
            tls_var.buf = create_string_buffer(size_)
            tls_var.bufSize = size_
            memmove(tls_var.buf, foo, sizeof(foo))
    except AttributeError:
        tls_var.buf = create_string_buffer(size_)
        tls_var.bufSize = size_
    return addressof(tls_var.buf)
callback function that resizes return buffer when it is too small
Args:
size_: size the return buffer needs to be
def resize_return_buffer(buf_, size_):
    '  callback function that resizes return buffer when it is too small\n  Args:\n  size_: size the return buffer needs to be\n  '
    try:
        if (not tls_var.buf):
            tls_var.buf = create_string_buffer(size_)
            tls_var.bufSize = size_
        elif (tls_var.bufSize < size_):
            foo = tls_var.buf
            tls_var.buf = create_string_buffer(size_)
            tls_var.bufSize = size_
            memmove(tls_var.buf, foo, sizeof(foo))
    except AttributeError:
        tls_var.buf = create_string_buffer(size_)
        tls_var.bufSize = size_
    return addressof(tls_var.buf)