1 | /* grefstring.h: Reference counted strings |
2 | * |
3 | * Copyright 2018 Emmanuele Bassi |
4 | * |
5 | * This library is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU Lesser General Public |
7 | * License as published by the Free Software Foundation; either |
8 | * version 2.1 of the License, or (at your option) any later version. |
9 | * |
10 | * This library is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | * Lesser General Public License for more details. |
14 | * |
15 | * You should have received a copy of the GNU Lesser General Public |
16 | * License along with this library; if not, see <http://www.gnu.org/licenses/>. |
17 | */ |
18 | |
19 | #pragma once |
20 | |
21 | #include "gmem.h" |
22 | #include "gmacros.h" |
23 | |
24 | G_BEGIN_DECLS |
25 | |
26 | GLIB_AVAILABLE_IN_2_58 |
27 | char * g_ref_string_new (const char *str); |
28 | GLIB_AVAILABLE_IN_2_58 |
29 | char * g_ref_string_new_len (const char *str, |
30 | gssize len); |
31 | GLIB_AVAILABLE_IN_2_58 |
32 | char * g_ref_string_new_intern (const char *str); |
33 | |
34 | GLIB_AVAILABLE_IN_2_58 |
35 | char * g_ref_string_acquire (char *str); |
36 | GLIB_AVAILABLE_IN_2_58 |
37 | void g_ref_string_release (char *str); |
38 | |
39 | GLIB_AVAILABLE_IN_2_58 |
40 | gsize g_ref_string_length (char *str); |
41 | |
42 | typedef char GRefString; |
43 | |
44 | G_END_DECLS |
45 | |