From bed28e4dc413a02826695ec0180070e5e434bb81 Mon Sep 17 00:00:00 2001
From: ilor <kailoran@gmail.com>
Date: Wed, 1 Jun 2011 17:30:42 +0200
Subject: [PATCH] Poliqarp header C++ compatibility: explicit casts from void*

---
 poliqarp-library/sakura/backend-base.h   | 4 ++--
 poliqarp-library/sakura/backend-interp.h | 4 ++--
 poliqarp-library/sakura/backend-meta.h   | 4 ++--
 poliqarp-library/sakura/backend-orth.h   | 2 +-
 poliqarp-library/sakura/backend-tag.h    | 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/poliqarp-library/sakura/backend-base.h b/poliqarp-library/sakura/backend-base.h
index 3cd81f8..250be09 100644
--- a/poliqarp-library/sakura/backend-base.h
+++ b/poliqarp-library/sakura/backend-base.h
@@ -70,14 +70,14 @@ static inline const char *poliqarp_backend_base_fetch__disamb(
    const struct poliqarp_backend_base *this, size_t key)
 {
    assert(key < this->dict_disamb.num_items);
-   return GET_ITEM(&this->dict_disamb, key);
+   return (const char*) GET_ITEM(&this->dict_disamb, key);
 }
 
 static inline const char *poliqarp_backend_base_fetch__amb(
    const struct poliqarp_backend_base *this, size_t key)
 {
    assert(key < this->dict_amb.num_items);
-   return GET_ITEM(&this->dict_amb, key);
+   return (const char*) GET_ITEM(&this->dict_amb, key);
 }
 
 static inline size_t poliqarp_backend_base_length__disamb(
diff --git a/poliqarp-library/sakura/backend-interp.h b/poliqarp-library/sakura/backend-interp.h
index 848edcf..9be605e 100644
--- a/poliqarp-library/sakura/backend-interp.h
+++ b/poliqarp-library/sakura/backend-interp.h
@@ -77,7 +77,7 @@ poliqarp_backend_interp_fetch__disamb(
    const struct poliqarp_backend_interp *this, size_t key)
 {
    assert(key < this->dict__disamb.num_items);
-   return GET_ITEM(&this->dict__disamb, key);
+   return (struct poliqarp_binary_interp*) GET_ITEM(&this->dict__disamb, key);
 }
 
 /**
@@ -109,7 +109,7 @@ poliqarp_backend_interp_fetch__amb(
    const struct poliqarp_backend_interp *this, size_t key)
 {
    assert(key < this->dict__amb.num_items);
-   return GET_ITEM(&this->dict__amb, key);
+   return (struct poliqarp_binary_interp*) GET_ITEM(&this->dict__amb, key);
 }
 
 /**
diff --git a/poliqarp-library/sakura/backend-meta.h b/poliqarp-library/sakura/backend-meta.h
index bcfe1d7..d2260a1 100644
--- a/poliqarp-library/sakura/backend-meta.h
+++ b/poliqarp-library/sakura/backend-meta.h
@@ -85,14 +85,14 @@ static inline const char *poliqarp_backend_meta_key_fetch(
    const struct poliqarp_backend_meta *this, size_t index)
 {
    assert(index < this->key.num_items);
-   return GET_ITEM(&this->key, index);
+   return (const char*) GET_ITEM(&this->key, index);
 }
 
 static inline const char *poliqarp_backend_meta_value_fetch(
    const struct poliqarp_backend_meta *this, size_t index)
 {
    assert(index < this->value.num_items);
-   return GET_ITEM(&this->value, index);
+   return (const char*) GET_ITEM(&this->value, index);
 }
 
 static inline struct poliqarp_binary_metadata poliqarp_backend_meta_fetch(
diff --git a/poliqarp-library/sakura/backend-orth.h b/poliqarp-library/sakura/backend-orth.h
index cf3006b..14cda8b 100644
--- a/poliqarp-library/sakura/backend-orth.h
+++ b/poliqarp-library/sakura/backend-orth.h
@@ -58,7 +58,7 @@ static inline const char *poliqarp_backend_orth_fetch(
    const struct poliqarp_backend_orth *this, size_t key)
 {
    assert(key < this->dict.num_items);
-   return GET_ITEM(&this->dict, key);
+   return (const char*) GET_ITEM(&this->dict, key);
 }
 
 static inline size_t poliqarp_backend_orth_length(
diff --git a/poliqarp-library/sakura/backend-tag.h b/poliqarp-library/sakura/backend-tag.h
index d8ecd5b..8889f04 100644
--- a/poliqarp-library/sakura/backend-tag.h
+++ b/poliqarp-library/sakura/backend-tag.h
@@ -71,7 +71,7 @@ static inline const char *poliqarp_backend_tag_fetch(
    const struct poliqarp_backend_tag *this, size_t key)
 {
    assert(key < this->dict.num_items);
-   return GET_ITEM(&this->dict, key);
+   return (const char*) GET_ITEM(&this->dict, key);
 }
 
 static inline const struct poliqarp_parsed_tag *poliqarp_backend_parsed_tag_fetch(
-- 
GitLab