[beast] SFI: Use fully namespaced assertion macros in headers.
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast] SFI: Use fully namespaced assertion macros in headers.
- Date: Wed, 14 Oct 2015 13:44:48 +0000 (UTC)
commit e1b081526e34c18533ff1a8c367a11790baf7b94
Author: Stefan Westerfeld <stefan space twc de>
Date: Wed Oct 14 15:17:22 2015 +0200
SFI: Use fully namespaced assertion macros in headers.
For instance assert_return is replaced by RAPICORN_ASSERT_RETURN.
Signed-off-by: Stefan Westerfeld <stefan space twc de>
Signed-off-by: Tim Janik <timj gnu org>
sfi/gbsearcharray.hh | 10 +++++-----
sfi/glib-extra.hh | 2 +-
sfi/sficxx.hh | 10 +++++-----
sfi/sfivisitors.hh | 2 +-
4 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/sfi/gbsearcharray.hh b/sfi/gbsearcharray.hh
index 5912f86..920bf08 100644
--- a/sfi/gbsearcharray.hh
+++ b/sfi/gbsearcharray.hh
@@ -114,7 +114,7 @@ g_bsearch_array_create (const GBSearchConfig *bconfig)
GBSearchArray *barray;
guint size;
- assert_return (bconfig != NULL, NULL);
+ RAPICORN_ASSERT_RETURN (bconfig != NULL, NULL);
size = sizeof (GBSearchArray) + bconfig->sizeof_node;
if (bconfig->flags & G_BSEARCH_ARRAY_ALIGN_POWER2)
@@ -172,7 +172,7 @@ g_bsearch_array_get_index (GBSearchArray *barray,
{
guint distance = ((guint8*) node_in_array) - G_BSEARCH_ARRAY_NODES (barray);
- assert_return (node_in_array != NULL, barray->n_nodes);
+ RAPICORN_ASSERT_RETURN (node_in_array != NULL, barray->n_nodes);
distance /= bconfig->sizeof_node;
@@ -187,7 +187,7 @@ g_bsearch_array_grow (GBSearchArray *barray,
guint new_size = old_size + bconfig->sizeof_node;
guint8 *node;
- assert_return (index <= barray->n_nodes, NULL);
+ RAPICORN_ASSERT_RETURN (index <= barray->n_nodes, NULL);
if (G_UNLIKELY (bconfig->flags & G_BSEARCH_ARRAY_ALIGN_POWER2))
{
@@ -251,7 +251,7 @@ g_bsearch_array_remove (GBSearchArray *barray,
{
guint8 *node;
- assert_return (index < barray->n_nodes, NULL);
+ RAPICORN_ASSERT_RETURN (index < barray->n_nodes, NULL);
barray->n_nodes -= 1;
node = G_BSEARCH_ARRAY_NODES (barray) + index * bconfig->sizeof_node;
@@ -284,7 +284,7 @@ static inline void
g_bsearch_array_free (GBSearchArray *barray,
const GBSearchConfig *bconfig)
{
- assert_return (barray != NULL);
+ RAPICORN_ASSERT_RETURN (barray != NULL);
g_free (barray);
}
diff --git a/sfi/glib-extra.hh b/sfi/glib-extra.hh
index b1d4f42..eac069d 100644
--- a/sfi/glib-extra.hh
+++ b/sfi/glib-extra.hh
@@ -171,7 +171,7 @@ g_bit_matrix_change (GBitMatrix *matrix,
gboolean bit_set)
{
guint32 cons, index, shift;
- assert_return (matrix && x < matrix->width && y < matrix->height);
+ RAPICORN_ASSERT_RETURN (matrix && x < matrix->width && y < matrix->height);
cons = y * matrix->width + x;
index = cons >> 5; /* / 32 */
shift = cons & 0x1f; /* % 32 */
diff --git a/sfi/sficxx.hh b/sfi/sficxx.hh
index b40101a..13f3cef 100644
--- a/sfi/sficxx.hh
+++ b/sfi/sficxx.hh
@@ -611,7 +611,7 @@ public:
void
unref ()
{
- assert_return (block != NULL && block->ref_count > 1);
+ RAPICORN_ASSERT_RETURN (block != NULL && block->ref_count > 1);
sfi_fblock_unref (block);
}
void
@@ -752,7 +752,7 @@ public:
void
unref ()
{
- assert_return (block != NULL && block->ref_count > 1);
+ RAPICORN_ASSERT_RETURN (block != NULL && block->ref_count > 1);
sfi_bblock_unref (block);
}
void resize (unsigned int length)
@@ -883,7 +883,7 @@ public:
void
unref ()
{
- assert_return (crec != NULL && crec->ref_count > 1);
+ RAPICORN_ASSERT_RETURN (crec != NULL && crec->ref_count > 1);
sfi_rec_unref (crec);
}
void
@@ -989,13 +989,13 @@ public:
void
ref ()
{
- assert_return (cobj != NULL && cobj->ref_count > 0);
+ RAPICORN_ASSERT_RETURN (cobj != NULL && cobj->ref_count > 0);
g_object_ref (cobj);
}
void
unref ()
{
- assert_return (cobj != NULL && cobj->ref_count > 1);
+ RAPICORN_ASSERT_RETURN (cobj != NULL && cobj->ref_count > 1);
g_object_unref (cobj);
}
void
diff --git a/sfi/sfivisitors.hh b/sfi/sfivisitors.hh
index 016687d..41f6a56 100644
--- a/sfi/sfivisitors.hh
+++ b/sfi/sfivisitors.hh
@@ -356,7 +356,7 @@ sfi_pspecs_fields_from_accessor_visitable (Visitable &visitable)
sfi_pspecs_acs_fields_cache (typeid (Visitable), &pspecsp, true);
pspecsp = NULL;
bool success = sfi_pspecs_acs_fields_cache (typeid (Visitable), &pspecsp);
- assert (success && pspecsp);
+ RAPICORN_ASSERT (success && pspecsp);
return *pspecsp;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]