Merge branch 'test-ip_mreq_source-android-only' into 'master'
[glib.git] / glib / grefstring.h
blob65b391ffa8e2815353ea6f1d94dafefff745c912
1 /* grefstring.h: Reference counted strings
3 * Copyright 2018 Emmanuele Bassi
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.
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.
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/>.
19 #pragma once
21 #include "gmem.h"
22 #include "gmacros.h"
24 G_BEGIN_DECLS
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);
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);
39 GLIB_AVAILABLE_IN_2_58
40 gsize g_ref_string_length (char *str);
42 typedef char GRefString;
44 G_END_DECLS