Blender V4.3
BLI_dynstr.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
17#include <stdarg.h>
18
19#include "BLI_compiler_attrs.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25struct DynStr;
26
28typedef struct DynStr DynStr;
29
42
49void BLI_dynstr_append(DynStr *__restrict ds, const char *cstr) ATTR_NONNULL();
57void BLI_dynstr_nappend(DynStr *__restrict ds, const char *cstr, int len) ATTR_NONNULL();
58
65void BLI_dynstr_appendf(DynStr *__restrict ds, const char *__restrict format, ...)
67void BLI_dynstr_vappendf(DynStr *__restrict ds, const char *__restrict format, va_list args)
69
93void BLI_dynstr_get_cstring_ex(const DynStr *__restrict ds, char *__restrict rets) ATTR_NONNULL();
94
107
108#ifdef __cplusplus
109}
110#endif
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_MALLOC
#define ATTR_PRINTF_FORMAT(format_param, dots_param)
#define ATTR_NONNULL(...)
char * BLI_dynstr_get_cstring(const DynStr *ds) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition BLI_dynstr.c:149
void BLI_dynstr_nappend(DynStr *__restrict ds, const char *cstr, int len) ATTR_NONNULL()
Definition BLI_dynstr.c:81
int BLI_dynstr_get_len(const DynStr *ds) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition BLI_dynstr.c:128
DynStr * BLI_dynstr_new(void) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
Definition BLI_dynstr.c:37
DynStr * BLI_dynstr_new_memarena(void) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
Definition BLI_dynstr.c:47
void BLI_dynstr_vappendf(DynStr *__restrict ds, const char *__restrict format, va_list args) ATTR_PRINTF_FORMAT(2
void BLI_dynstr_clear(DynStr *ds) ATTR_NONNULL()
Definition BLI_dynstr.c:156
void BLI_dynstr_free(DynStr *ds) ATTR_NONNULL()
Definition BLI_dynstr.c:174
void BLI_dynstr_appendf(DynStr *__restrict ds, const char *__restrict format,...) ATTR_PRINTF_FORMAT(2
void BLI_dynstr_get_cstring_ex(const DynStr *__restrict ds, char *__restrict rets) ATTR_NONNULL()
Definition BLI_dynstr.c:133
void BLI_dynstr_append(DynStr *__restrict ds, const char *cstr) ATTR_NONNULL()
Definition BLI_dynstr.c:62
int len
format