[libdazzle] build: fix compilation with c++
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] build: fix compilation with c++
- Date: Sun, 31 May 2020 00:23:37 +0000 (UTC)
commit e2efb169d96c1e8ef6fa67762572d715d52d9e57
Author: Christian Hergert <chergert redhat com>
Date: Sat May 30 17:23:21 2020 -0700
build: fix compilation with c++
Fixes #54
src/util/dzl-int-pair.h | 4 ++--
src/util/dzl-macros.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/util/dzl-int-pair.h b/src/util/dzl-int-pair.h
index b66992b..887aa73 100644
--- a/src/util/dzl-int-pair.h
+++ b/src/util/dzl-int-pair.h
@@ -87,7 +87,7 @@ dzl_int_pair_new (gint first, gint second)
pair.second = second;
#ifdef DZL_INT_PAIR_64
- return pair.ptr;
+ return (DzlIntPair *)pair.ptr;
#else
return g_slice_copy (sizeof (DzlIntPair), &pair);
#endif
@@ -110,7 +110,7 @@ dzl_uint_pair_new (guint first, guint second)
pair.second = second;
#ifdef DZL_INT_PAIR_64
- return pair.ptr;
+ return (DzlUIntPair *)pair.ptr;
#else
return g_slice_copy (sizeof (DzlUIntPair), &pair);
#endif
diff --git a/src/util/dzl-macros.h b/src/util/dzl-macros.h
index bb36c1c..09332a0 100644
--- a/src/util/dzl-macros.h
+++ b/src/util/dzl-macros.h
@@ -94,7 +94,7 @@ dzl_str_equal0 (gconstpointer str1,
{
/* We use gconstpointer so that we can allow
* both signed and unsigned chars here (such as xmlChar). */
- return g_strcmp0 (str1, str2) == 0;
+ return g_strcmp0 ((const gchar *)str1, (const gchar *)str2) == 0;
}
static inline void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]