[libdazzle] util: add string helper inline functions
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] util: add string helper inline functions
- Date: Tue, 6 Jun 2017 01:42:09 +0000 (UTC)
commit 2b73eb9b3ae0294a119952ed6537c52d5c2109a2
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 5 18:36:59 2017 -0700
util: add string helper inline functions
src/util/dzl-util-private.h | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/util/dzl-util-private.h b/src/util/dzl-util-private.h
index c285d96..89fc4ae 100644
--- a/src/util/dzl-util-private.h
+++ b/src/util/dzl-util-private.h
@@ -29,6 +29,19 @@ G_BEGIN_DECLS
#define dzl_set_weak_pointer(ptr,obj) \
((obj!=*(ptr))?(dzl_clear_weak_pointer(ptr),*(ptr)=obj,((obj)?g_object_add_weak_pointer((GObject*)obj,(gpointer*)ptr),NULL:NULL),1):0)
+static inline gboolean
+dzl_str_empty0 (const gchar *str)
+{
+ return str == NULL || *str == '\0';
+}
+
+static inline gboolean
+dzl_str_equal0 (const gchar *str1,
+ const gchar *str2)
+{
+ return g_strcmp0 (str1, str2) == 0;
+}
+
void dzl_gtk_widget_class_add_css_resource (GtkWidgetClass *widget_class,
const gchar *resource);
void dzl_gtk_widget_add_class (GtkWidget *widget,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]