Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.119
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
include /
glib-2.0 /
glib /
Delete
Unzip
Name
Size
Permission
Date
Action
deprecated
[ DIR ]
drwxr-xr-x
2024-03-12 14:18
galloca.h
3.82
KB
-rw-r--r--
2022-06-06 13:28
garray.h
8.78
KB
-rw-r--r--
2022-06-06 13:28
gasyncqueue.h
5.53
KB
-rw-r--r--
2022-06-06 13:28
gatomic.h
14.42
KB
-rw-r--r--
2022-06-06 13:28
gbacktrace.h
2.46
KB
-rw-r--r--
2022-06-06 13:28
gbase64.h
2.27
KB
-rw-r--r--
2022-06-06 13:28
gbitlock.h
2.83
KB
-rw-r--r--
2022-06-06 13:28
gbookmarkfile.h
9.45
KB
-rw-r--r--
2022-06-06 13:28
gbytes.h
3.25
KB
-rw-r--r--
2022-06-06 13:28
gcharset.h
1.34
KB
-rw-r--r--
2022-06-06 13:28
gchecksum.h
3.68
KB
-rw-r--r--
2022-06-06 13:28
gconvert.h
6.84
KB
-rw-r--r--
2022-06-06 13:28
gdataset.h
6.1
KB
-rw-r--r--
2022-06-06 13:28
gdate.h
11.38
KB
-rw-r--r--
2022-06-06 13:28
gdatetime.h
11.81
KB
-rw-r--r--
2022-06-06 13:28
gdir.h
2.04
KB
-rw-r--r--
2022-06-06 13:28
genviron.h
2.82
KB
-rw-r--r--
2022-06-06 13:28
gerror.h
3.89
KB
-rw-r--r--
2022-06-06 13:28
gfileutils.h
6.64
KB
-rw-r--r--
2022-06-06 13:28
ggettext.h
2.37
KB
-rw-r--r--
2022-06-06 13:28
ghash.h
7.37
KB
-rw-r--r--
2022-06-06 13:28
ghmac.h
3.39
KB
-rw-r--r--
2022-06-06 13:28
ghook.h
6.21
KB
-rw-r--r--
2022-06-06 13:28
ghostutils.h
1.42
KB
-rw-r--r--
2022-06-06 13:28
gi18n-lib.h
1.34
KB
-rw-r--r--
2022-06-06 13:28
gi18n.h
1.14
KB
-rw-r--r--
2022-06-06 13:28
giochannel.h
13.97
KB
-rw-r--r--
2022-06-06 13:28
gkeyfile.h
14.48
KB
-rw-r--r--
2022-06-06 13:28
glib-autocleanups.h
4.04
KB
-rw-r--r--
2022-06-06 13:28
glist.h
5.68
KB
-rw-r--r--
2022-06-06 13:28
gmacros.h
16.61
KB
-rw-r--r--
2022-06-06 13:28
gmain.h
22.03
KB
-rw-r--r--
2022-06-06 13:28
gmappedfile.h
1.96
KB
-rw-r--r--
2022-06-06 13:28
gmarkup.h
10.63
KB
-rw-r--r--
2022-06-06 13:28
gmem.h
12.89
KB
-rw-r--r--
2022-06-06 13:28
gmessages.h
25.04
KB
-rw-r--r--
2022-06-06 13:28
gnode.h
8.91
KB
-rw-r--r--
2022-06-06 13:28
goption.h
15.65
KB
-rw-r--r--
2022-06-06 13:28
gpattern.h
1.74
KB
-rw-r--r--
2022-06-06 13:28
gpoll.h
4.03
KB
-rw-r--r--
2022-06-06 13:28
gprimes.h
1.65
KB
-rw-r--r--
2022-06-06 13:28
gprintf.h
1.94
KB
-rw-r--r--
2022-06-06 13:28
gqsort.h
1.46
KB
-rw-r--r--
2022-06-06 13:28
gquark.h
2.62
KB
-rw-r--r--
2022-06-06 13:28
gqueue.h
6.97
KB
-rw-r--r--
2022-06-06 13:28
grand.h
3.11
KB
-rw-r--r--
2022-06-06 13:28
gregex.h
27.5
KB
-rw-r--r--
2022-06-06 13:28
gscanner.h
8.47
KB
-rw-r--r--
2022-06-06 13:28
gsequence.h
8.6
KB
-rw-r--r--
2022-06-06 13:28
gshell.h
1.78
KB
-rw-r--r--
2022-06-06 13:28
gslice.h
3.81
KB
-rw-r--r--
2022-06-06 13:28
gslist.h
5.46
KB
-rw-r--r--
2022-06-06 13:28
gspawn.h
13.99
KB
-rw-r--r--
2022-06-06 13:28
gstdio.h
4.74
KB
-rw-r--r--
2022-06-06 13:28
gstrfuncs.h
11.2
KB
-rw-r--r--
2022-06-06 13:28
gstring.h
7.78
KB
-rw-r--r--
2022-06-06 13:28
gstringchunk.h
2.08
KB
-rw-r--r--
2022-06-06 13:28
gtestutils.h
23.27
KB
-rw-r--r--
2022-06-06 13:28
gthread.h
11.34
KB
-rw-r--r--
2022-06-06 13:28
gthreadpool.h
3.73
KB
-rw-r--r--
2022-06-06 13:28
gtimer.h
2.31
KB
-rw-r--r--
2022-06-06 13:28
gtimezone.h
3.41
KB
-rw-r--r--
2022-06-06 13:28
gtrashstack.h
1.74
KB
-rw-r--r--
2022-06-06 13:28
gtree.h
4.09
KB
-rw-r--r--
2022-06-06 13:28
gtypes.h
18.98
KB
-rw-r--r--
2022-06-06 13:28
gunicode.h
37.75
KB
-rw-r--r--
2022-06-06 13:28
gurifuncs.h
2.65
KB
-rw-r--r--
2022-06-06 13:28
gutils.h
10.98
KB
-rw-r--r--
2022-06-06 13:28
gvariant.h
28.83
KB
-rw-r--r--
2022-06-06 13:28
gvarianttype.h
12.8
KB
-rw-r--r--
2022-06-06 13:28
gversion.h
1.93
KB
-rw-r--r--
2022-06-06 13:28
gversionmacros.h
14.16
KB
-rw-r--r--
2022-06-06 13:28
gwin32.h
5.34
KB
-rw-r--r--
2022-06-06 13:28
Save
Rename
/* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ /* This file must not include any other glib header file and must thus * not refer to variables from glibconfig.h */ #ifndef __G_MACROS_H__ #define __G_MACROS_H__ #if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) #error "Only <glib.h> can be included directly." #endif /* We include stddef.h to get the system's definition of NULL */ #include <stddef.h> #define G_GNUC_CHECK_VERSION(major, minor) \ (defined(__GNUC__) && \ ((__GNUC__ > (major)) || \ ((__GNUC__ == (major)) && \ (__GNUC_MINOR__ >= (minor))))) /* Here we provide G_GNUC_EXTENSION as an alias for __extension__, * where this is valid. This allows for warningless compilation of * "long long" types even in the presence of '-ansi -pedantic'. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) #define G_GNUC_EXTENSION __extension__ #else #define G_GNUC_EXTENSION #endif /* Every compiler that we target supports inlining, but some of them may * complain about it if we don't say "__inline". If we have C99, or if * we are using C++, then we can use "inline" directly. Unfortunately * Visual Studio does not support __STDC_VERSION__, so we need to check * whether we are on Visual Studio 2013 or earlier to see that we need to * say "__inline" in C mode. * Otherwise, we say "__inline" to avoid the warning. */ #define G_CAN_INLINE #ifndef __cplusplus # ifdef _MSC_VER # if (_MSC_VER < 1900) # define G_INLINE_DEFINE_NEEDED # endif # elif !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199900) # define G_INLINE_DEFINE_NEEDED # endif #endif #ifdef G_INLINE_DEFINE_NEEDED # undef inline # define inline __inline #endif #undef G_INLINE_DEFINE_NEEDED /* For historical reasons we need to continue to support those who * define G_IMPLEMENT_INLINES to mean "don't implement this here". */ #ifdef G_IMPLEMENT_INLINES # define G_INLINE_FUNC extern # undef G_CAN_INLINE #else # define G_INLINE_FUNC static inline #endif /* G_IMPLEMENT_INLINES */ /* Provide macros to feature the GCC function attribute. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) #define G_GNUC_PURE __attribute__((__pure__)) #define G_GNUC_MALLOC __attribute__((__malloc__)) #else #define G_GNUC_PURE #define G_GNUC_MALLOC #endif #if __GNUC__ >= 4 #define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__)) #else #define G_GNUC_NULL_TERMINATED #endif /* Clang feature detection: http://clang.llvm.org/docs/LanguageExtensions.html */ #ifndef __has_attribute #define __has_attribute(x) 0 #endif #ifndef __has_feature #define __has_feature(x) 0 #endif #ifndef __has_builtin #define __has_builtin(x) 0 #endif #if (!defined(__clang__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || \ (defined(__clang__) && __has_attribute(__alloc_size__)) #define G_GNUC_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) #define G_GNUC_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y))) #else #define G_GNUC_ALLOC_SIZE(x) #define G_GNUC_ALLOC_SIZE2(x,y) #endif #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) #define G_GNUC_PRINTF( format_idx, arg_idx ) \ __attribute__((__format__ (__printf__, format_idx, arg_idx))) #define G_GNUC_SCANF( format_idx, arg_idx ) \ __attribute__((__format__ (__scanf__, format_idx, arg_idx))) #define G_GNUC_FORMAT( arg_idx ) \ __attribute__((__format_arg__ (arg_idx))) #define G_GNUC_NORETURN \ __attribute__((__noreturn__)) #define G_GNUC_CONST \ __attribute__((__const__)) #define G_GNUC_UNUSED \ __attribute__((__unused__)) #define G_GNUC_NO_INSTRUMENT \ __attribute__((__no_instrument_function__)) #else /* !__GNUC__ */ #define G_GNUC_PRINTF( format_idx, arg_idx ) #define G_GNUC_SCANF( format_idx, arg_idx ) #define G_GNUC_FORMAT( arg_idx ) #define G_GNUC_NORETURN #define G_GNUC_CONST #define G_GNUC_UNUSED #define G_GNUC_NO_INSTRUMENT #endif /* !__GNUC__ */ #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) #define G_GNUC_DEPRECATED __attribute__((__deprecated__)) #else #define G_GNUC_DEPRECATED #endif /* __GNUC__ */ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) #define G_GNUC_DEPRECATED_FOR(f) \ __attribute__((deprecated("Use " #f " instead"))) #else #define G_GNUC_DEPRECATED_FOR(f) G_GNUC_DEPRECATED #endif /* __GNUC__ */ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"") #define G_GNUC_END_IGNORE_DEPRECATIONS \ _Pragma ("GCC diagnostic pop") #elif defined (_MSC_VER) && (_MSC_VER >= 1500) #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ __pragma (warning (push)) \ __pragma (warning (disable : 4996)) #define G_GNUC_END_IGNORE_DEPRECATIONS \ __pragma (warning (pop)) #elif defined (__clang__) #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ _Pragma("clang diagnostic push") \ _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") #define G_GNUC_END_IGNORE_DEPRECATIONS \ _Pragma("clang diagnostic pop") #else #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS #define G_GNUC_END_IGNORE_DEPRECATIONS #endif #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) #define G_GNUC_MAY_ALIAS __attribute__((may_alias)) #else #define G_GNUC_MAY_ALIAS #endif #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) #define G_GNUC_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else #define G_GNUC_WARN_UNUSED_RESULT #endif /* __GNUC__ */ #ifndef G_DISABLE_DEPRECATED /* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with * macros, so we can refer to them as strings unconditionally. * usage not-recommended since gcc-3.0 */ #if defined (__GNUC__) && (__GNUC__ < 3) #define G_GNUC_FUNCTION __FUNCTION__ #define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__ #else /* !__GNUC__ */ #define G_GNUC_FUNCTION "" #define G_GNUC_PRETTY_FUNCTION "" #endif /* !__GNUC__ */ #endif /* !G_DISABLE_DEPRECATED */ #if __has_feature(attribute_analyzer_noreturn) && defined(__clang_analyzer__) #define G_ANALYZER_ANALYZING 1 #define G_ANALYZER_NORETURN __attribute__((analyzer_noreturn)) #else #define G_ANALYZER_ANALYZING 0 #define G_ANALYZER_NORETURN #endif #define G_STRINGIFY(macro_or_string) G_STRINGIFY_ARG (macro_or_string) #define G_STRINGIFY_ARG(contents) #contents #ifndef __GI_SCANNER__ /* The static assert macro really confuses the introspection parser */ #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2 #define G_PASTE(identifier1,identifier2) G_PASTE_ARGS (identifier1, identifier2) #ifdef __COUNTER__ #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED #else #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __LINE__)[(expr) ? 1 : -1] G_GNUC_UNUSED #endif #define G_STATIC_ASSERT_EXPR(expr) ((void) sizeof (char[(expr) ? 1 : -1])) #endif /* Provide a string identifying the current code position */ #if defined(__GNUC__) && (__GNUC__ < 3) && !defined(__cplusplus) #define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) ":" __PRETTY_FUNCTION__ "()" #else #define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) #endif /* Provide a string identifying the current function, non-concatenatable */ #if defined (__GNUC__) && defined (__cplusplus) #define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__)) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define G_STRFUNC ((const char*) (__func__)) #elif defined (__GNUC__) || (defined(_MSC_VER) && (_MSC_VER > 1300)) #define G_STRFUNC ((const char*) (__FUNCTION__)) #else #define G_STRFUNC ((const char*) ("???")) #endif /* Guard C code in headers, while including them from C++ */ #ifdef __cplusplus #define G_BEGIN_DECLS extern "C" { #define G_END_DECLS } #else #define G_BEGIN_DECLS #define G_END_DECLS #endif /* Provide definitions for some commonly used macros. * Some of them are only provided if they haven't already * been defined. It is assumed that if they are already * defined then the current definition is correct. */ #ifndef NULL # ifdef __cplusplus # define NULL (0L) # else /* !__cplusplus */ # define NULL ((void*) 0) # endif /* !__cplusplus */ #endif #ifndef FALSE #define FALSE (0) #endif #ifndef TRUE #define TRUE (!FALSE) #endif #undef MAX #define MAX(a, b) (((a) > (b)) ? (a) : (b)) #undef MIN #define MIN(a, b) (((a) < (b)) ? (a) : (b)) #undef ABS #define ABS(a) (((a) < 0) ? -(a) : (a)) #undef CLAMP #define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) /* Count the number of elements in an array. The array must be defined * as such; using this with a dynamically allocated array will give * incorrect results. */ #define G_N_ELEMENTS(arr) (sizeof (arr) / sizeof ((arr)[0])) /* Macros by analogy to GINT_TO_POINTER, GPOINTER_TO_INT */ #define GPOINTER_TO_SIZE(p) ((gsize) (p)) #define GSIZE_TO_POINTER(s) ((gpointer) (gsize) (s)) /* Provide convenience macros for handling structure * fields through their offsets. */ #if (defined(__GNUC__) && __GNUC__ >= 4) || defined (_MSC_VER) #define G_STRUCT_OFFSET(struct_type, member) \ ((glong) offsetof (struct_type, member)) #else #define G_STRUCT_OFFSET(struct_type, member) \ ((glong) ((guint8*) &((struct_type*) 0)->member)) #endif #define G_STRUCT_MEMBER_P(struct_p, struct_offset) \ ((gpointer) ((guint8*) (struct_p) + (glong) (struct_offset))) #define G_STRUCT_MEMBER(member_type, struct_p, struct_offset) \ (*(member_type*) G_STRUCT_MEMBER_P ((struct_p), (struct_offset))) /* Provide simple macro statement wrappers: * G_STMT_START { statements; } G_STMT_END; * This can be used as a single statement, like: * if (x) G_STMT_START { ... } G_STMT_END; else ... * This intentionally does not use compiler extensions like GCC's '({...})' to * avoid portability issue or side effects when compiled with different compilers. * MSVC complains about "while(0)": C4127: "Conditional expression is constant", * so we use __pragma to avoid the warning since the use here is intentional. */ #if !(defined (G_STMT_START) && defined (G_STMT_END)) #define G_STMT_START do #if defined (_MSC_VER) && (_MSC_VER >= 1500) #define G_STMT_END \ __pragma(warning(push)) \ __pragma(warning(disable:4127)) \ while(0) \ __pragma(warning(pop)) #else #define G_STMT_END while (0) #endif #endif /* Deprecated -- do not use. */ #ifndef G_DISABLE_DEPRECATED #ifdef G_DISABLE_CONST_RETURNS #define G_CONST_RETURN #else #define G_CONST_RETURN const #endif #endif /* * The G_LIKELY and G_UNLIKELY macros let the programmer give hints to * the compiler about the expected result of an expression. Some compilers * can use this information for optimizations. * * The _G_BOOLEAN_EXPR macro is intended to trigger a gcc warning when * putting assignments in g_return_if_fail (). */ #if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__) #define _G_BOOLEAN_EXPR(expr) \ G_GNUC_EXTENSION ({ \ int _g_boolean_var_; \ if (expr) \ _g_boolean_var_ = 1; \ else \ _g_boolean_var_ = 0; \ _g_boolean_var_; \ }) #define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR((expr)), 1)) #define G_UNLIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR((expr)), 0)) #else #define G_LIKELY(expr) (expr) #define G_UNLIKELY(expr) (expr) #endif #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) #define G_DEPRECATED __attribute__((__deprecated__)) #elif defined(_MSC_VER) && (_MSC_VER >= 1300) #define G_DEPRECATED __declspec(deprecated) #else #define G_DEPRECATED #endif #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) #define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead"))) #elif defined(_MSC_FULL_VER) && (_MSC_FULL_VER > 140050320) #define G_DEPRECATED_FOR(f) __declspec(deprecated("is deprecated. Use '" #f "' instead")) #else #define G_DEPRECATED_FOR(f) G_DEPRECATED #endif #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) #define G_UNAVAILABLE(maj,min) __attribute__((deprecated("Not available before " #maj "." #min))) #elif defined(_MSC_FULL_VER) && (_MSC_FULL_VER > 140050320) #define G_UNAVAILABLE(maj,min) __declspec(deprecated("is not available before " #maj "." #min)) #else #define G_UNAVAILABLE(maj,min) G_DEPRECATED #endif #ifndef _GLIB_EXTERN #define _GLIB_EXTERN extern #endif /* These macros are used to mark deprecated functions in GLib headers, * and thus have to be exposed in installed headers. But please * do *not* use them in other projects. Instead, use G_DEPRECATED * or define your own wrappers around it. */ #ifdef GLIB_DISABLE_DEPRECATION_WARNINGS #define GLIB_DEPRECATED _GLIB_EXTERN #define GLIB_DEPRECATED_FOR(f) _GLIB_EXTERN #define GLIB_UNAVAILABLE(maj,min) _GLIB_EXTERN #else #define GLIB_DEPRECATED G_DEPRECATED _GLIB_EXTERN #define GLIB_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _GLIB_EXTERN #define GLIB_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _GLIB_EXTERN #endif #ifdef __GNUC__ /* these macros are private */ #define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName #define _GLIB_AUTOPTR_TYPENAME(TypeName) TypeName##_autoptr #define _GLIB_AUTO_FUNC_NAME(TypeName) glib_auto_cleanup_##TypeName #define _GLIB_CLEANUP(func) __attribute__((cleanup(func))) #define _GLIB_DEFINE_AUTOPTR_CHAINUP(ModuleObjName, ParentName) \ typedef ModuleObjName *_GLIB_AUTOPTR_TYPENAME(ModuleObjName); \ static inline void _GLIB_AUTOPTR_FUNC_NAME(ModuleObjName) (ModuleObjName **_ptr) { \ _GLIB_AUTOPTR_FUNC_NAME(ParentName) ((ParentName **) _ptr); } \ /* these macros are API */ #define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func) \ typedef TypeName *_GLIB_AUTOPTR_TYPENAME(TypeName); \ G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ static inline void _GLIB_AUTOPTR_FUNC_NAME(TypeName) (TypeName **_ptr) { if (*_ptr) (func) (*_ptr); } \ G_GNUC_END_IGNORE_DEPRECATIONS #define G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TypeName, func) \ G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ static inline void _GLIB_AUTO_FUNC_NAME(TypeName) (TypeName *_ptr) { (func) (_ptr); } \ G_GNUC_END_IGNORE_DEPRECATIONS #define G_DEFINE_AUTO_CLEANUP_FREE_FUNC(TypeName, func, none) \ G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ static inline void _GLIB_AUTO_FUNC_NAME(TypeName) (TypeName *_ptr) { if (*_ptr != none) (func) (*_ptr); } \ G_GNUC_END_IGNORE_DEPRECATIONS #define g_autoptr(TypeName) _GLIB_CLEANUP(_GLIB_AUTOPTR_FUNC_NAME(TypeName)) _GLIB_AUTOPTR_TYPENAME(TypeName) #define g_auto(TypeName) _GLIB_CLEANUP(_GLIB_AUTO_FUNC_NAME(TypeName)) TypeName #define g_autofree _GLIB_CLEANUP(g_autoptr_cleanup_generic_gfree) #else /* not GNU C */ /* this (dummy) macro is private */ #define _GLIB_DEFINE_AUTOPTR_CHAINUP(ModuleObjName, ParentName) /* these (dummy) macros are API */ #define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func) #define G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TypeName, func) #define G_DEFINE_AUTO_CLEANUP_FREE_FUNC(TypeName, func, none) /* no declaration of g_auto() or g_autoptr() here */ #endif #endif /* __G_MACROS_H__ */