/* This file is part of limb https://lila.oss/limb
* Copyright (C) 2023 Olivier Brunel jjk@jjacky.com */
/* SPDX-License-Identifier: GPL-2.0-only */
#include <limb/buffer-shldata.h>
#include <limb/gccattributes.h>
#include "buffer-shldata.h"
static ssize_t
fn(const char *s, size_t l, void *args gccattr_unused, buffer_shldata_ctx *ctx)
{
return shldata_finalr(s, l, &ctx->sd);
}
int
buffer_shldata_getfinal_sa(buffer *b, stralloc *sa, buffer_shldata_ctx *ctx)
{
return buffer_shldata_getfull(b, fn, NULL, sa, ctx);
}