summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaLyong Cho <walyong.cho@samsung.com>2016-11-08 07:46:58 (GMT)
committerWaLyong Cho <walyong.cho@samsung.com>2016-11-08 07:46:58 (GMT)
commit48c7900d68747a0d49f87167a60e596c4a8d2ef4 (patch)
tree82e90a3c50976c4a5fb50b5c4036543cb12c8bd9
parentafe1bda81ad5fb9bdbcc224f090e6b4b17dae563 (diff)
downloadlibsystem-48c7900d68747a0d49f87167a60e596c4a8d2ef4.zip
libsystem-48c7900d68747a0d49f87167a60e596c4a8d2ef4.tar.gz
libsystem-48c7900d68747a0d49f87167a60e596c4a8d2ef4.tar.bz2
libsystem: glib-util: wipe out _cleanup_g_xxx_
Recent glib supports g_auto(), g_autoptr() and g_autofree. Change-Id: Iddaa0ef550c6c115cd8fa0359f358091504d7111 Signed-off-by: WaLyong Cho <walyong.cho@samsung.com>
-rw-r--r--src/libsystem/glib-util.h85
1 files changed, 0 insertions, 85 deletions
diff --git a/src/libsystem/glib-util.h b/src/libsystem/glib-util.h
index b87ebdf..7d3c7ad 100644
--- a/src/libsystem/glib-util.h
+++ b/src/libsystem/glib-util.h
@@ -38,91 +38,6 @@
extern "C" {
#endif
-
-/**
- * gchar free function. This function has to not be called
- * directly. If a gchar value is declared with #_cleanup_g_free_, this
- * function is called when the value goes out of scope.
- */
-static inline void __g_free(gchar **p) {
- if (*p)
- g_free(*p);
-}
-
-/**
- * GError free function. This function has to not be called
- * directly. If a GError value is declared with
- * #_cleanup_g_error_free_, this function is called when the value
- * goes out of scope.
- */
-static inline void __g_error_free(GError **e) {
- if (*e)
- g_error_free(*e);
-}
-
-/**
- * GObject free function. This function has to not be called
- * directly. If a GObject value is declared with
- * #_cleanup_g_object_unref_, this function is called when the value
- * goes out of scope.
- */
-static inline void __g_object_unref(gpointer p) {
- if (p)
- g_object_unref(*(gpointer *) p);
-}
-
-/**
- * GVariant free function. This function has to not be called
- * directly. If a GVariant value is declared with
- * #_cleanup_g_variant_unref_, this function is called when the value
- * goes out of scope.
- */
-static inline void __g_variant_unref(GVariant **v) {
- if (*v)
- g_variant_unref(*v);
-}
-
-/**
- * GVariantIter free function. This function has to not be called
- * directly. If a GVariantIter value is declared with
- * #_cleanup_g_variant_iter_free_, this function is called when the
- * value goes out of scope.
- */
-static inline void __g_variant_iter_free(GVariantIter **i) {
- if (*i)
- g_variant_iter_free(*i);
-}
-
-/**
- * cleanup attribute for gchar to run #__g_free() when the value is
- * going out of scope.
- */
-#define _cleanup_g_free_ _cleanup_(__g_free)
-
-/**
- * cleanup attribute for GError to run #__g_error_free() when the
- * value is going out of scope.
- */
-#define _cleanup_g_error_free_ _cleanup_(__g_error_free)
-
-/**
- * cleanup attribute for GObject to run #__g_object_unref() when the
- * value is going out of scope.
- */
-#define _cleanup_g_object_unref_ _cleanup_(__g_object_unref)
-
-/**
- * cleanup attribute for GVariant to run #__g_variant_unref() when the
- * value is going out of scope.
- */
-#define _cleanup_g_variant_unref_ _cleanup_(__g_variant_unref)
-
-/**
- * cleanup attribute for GVariantIter to run #__g_variant_iter_free()
- * when the value is going out of scope.
- */
-#define _cleanup_g_variant_iter_free_ _cleanup_(__g_variant_iter_free)
-
/**
* @brief Iterate for each list nodes.
*