Skip to content
Snippets Groups Projects
Commit bed28e4d authored by ilor's avatar ilor
Browse files

Poliqarp header C++ compatibility: explicit casts from void*

parent b21f707e
No related merge requests found
...@@ -70,14 +70,14 @@ static inline const char *poliqarp_backend_base_fetch__disamb( ...@@ -70,14 +70,14 @@ static inline const char *poliqarp_backend_base_fetch__disamb(
const struct poliqarp_backend_base *this, size_t key) const struct poliqarp_backend_base *this, size_t key)
{ {
assert(key < this->dict_disamb.num_items); 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( static inline const char *poliqarp_backend_base_fetch__amb(
const struct poliqarp_backend_base *this, size_t key) const struct poliqarp_backend_base *this, size_t key)
{ {
assert(key < this->dict_amb.num_items); 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( static inline size_t poliqarp_backend_base_length__disamb(
......
...@@ -77,7 +77,7 @@ poliqarp_backend_interp_fetch__disamb( ...@@ -77,7 +77,7 @@ poliqarp_backend_interp_fetch__disamb(
const struct poliqarp_backend_interp *this, size_t key) const struct poliqarp_backend_interp *this, size_t key)
{ {
assert(key < this->dict__disamb.num_items); 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( ...@@ -109,7 +109,7 @@ poliqarp_backend_interp_fetch__amb(
const struct poliqarp_backend_interp *this, size_t key) const struct poliqarp_backend_interp *this, size_t key)
{ {
assert(key < this->dict__amb.num_items); 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);
} }
/** /**
......
...@@ -85,14 +85,14 @@ static inline const char *poliqarp_backend_meta_key_fetch( ...@@ -85,14 +85,14 @@ static inline const char *poliqarp_backend_meta_key_fetch(
const struct poliqarp_backend_meta *this, size_t index) const struct poliqarp_backend_meta *this, size_t index)
{ {
assert(index < this->key.num_items); 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( static inline const char *poliqarp_backend_meta_value_fetch(
const struct poliqarp_backend_meta *this, size_t index) const struct poliqarp_backend_meta *this, size_t index)
{ {
assert(index < this->value.num_items); 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( static inline struct poliqarp_binary_metadata poliqarp_backend_meta_fetch(
......
...@@ -58,7 +58,7 @@ static inline const char *poliqarp_backend_orth_fetch( ...@@ -58,7 +58,7 @@ static inline const char *poliqarp_backend_orth_fetch(
const struct poliqarp_backend_orth *this, size_t key) const struct poliqarp_backend_orth *this, size_t key)
{ {
assert(key < this->dict.num_items); 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( static inline size_t poliqarp_backend_orth_length(
......
...@@ -71,7 +71,7 @@ static inline const char *poliqarp_backend_tag_fetch( ...@@ -71,7 +71,7 @@ static inline const char *poliqarp_backend_tag_fetch(
const struct poliqarp_backend_tag *this, size_t key) const struct poliqarp_backend_tag *this, size_t key)
{ {
assert(key < this->dict.num_items); 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( static inline const struct poliqarp_parsed_tag *poliqarp_backend_parsed_tag_fetch(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment