[beast: 19/22] SFI: use Rapicorn's assert() instead of g_assert()
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 19/22] SFI: use Rapicorn's assert() instead of g_assert()
- Date: Thu, 24 Sep 2015 20:10:33 +0000 (UTC)
commit 267cc7b77be150229040a7ca5f2bc0fead633260
Author: Tim Janik <timj gnu org>
Date: Mon Sep 21 20:34:19 2015 +0200
SFI: use Rapicorn's assert() instead of g_assert()
sfi/sfidl-cbase.cc | 20 ++++++++++----------
sfi/sfidl-factory.cc | 2 +-
sfi/sfidl-namespace.cc | 2 +-
sfi/sfifilecrawler.cc | 6 +++---
sfi/sfiglue.cc | 4 ++--
sfi/sfigluecodec.cc | 2 +-
sfi/sfiparams.cc | 2 +-
sfi/sfiring.cc | 2 +-
sfi/sfistore.cc | 2 +-
sfi/sfitime.cc | 2 +-
sfi/sfivalues.cc | 2 +-
11 files changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/sfi/sfidl-cbase.cc b/sfi/sfidl-cbase.cc
index 9275de7..99a3d6d 100644
--- a/sfi/sfidl-cbase.cc
+++ b/sfi/sfidl-cbase.cc
@@ -254,30 +254,30 @@ String CodeGeneratorCBase::createTypeCode (const String& type, const String &nam
* GValues
*/
// how to create a new "type" called "name" from a GValue*
- case MODEL_FROM_VALUE: g_assert (name != ""); break;
+ case MODEL_FROM_VALUE: assert (name != ""); break;
// how to convert the "type" called "name" to a GValue*
- case MODEL_TO_VALUE: g_assert (name != ""); break;
+ case MODEL_TO_VALUE: assert (name != ""); break;
/*
* vcall interface: the following models deal with how to perform a
* method/procedure invocation using a given data type
*/
// the name of the VCALL function for calling functions returning "type"
- case MODEL_VCALL: g_assert (name == ""); break;
+ case MODEL_VCALL: assert (name == ""); break;
// how to pass a "type" called "name" to the VCALL function
- case MODEL_VCALL_ARG: g_assert (name != ""); break;
+ case MODEL_VCALL_ARG: assert (name != ""); break;
// what type a conversion results in (== MODEL_VCALL_RET ?)
- case MODEL_VCALL_CARG: g_assert (name == ""); break;
+ case MODEL_VCALL_CARG: assert (name == ""); break;
// how to perform the conversion of a vcall parameter called "name" (optional: "" if unused)
- case MODEL_VCALL_CONV: g_assert (name != ""); break;
+ case MODEL_VCALL_CONV: assert (name != ""); break;
// how to free the conversion result of "name" (optional: "" if unused)
- case MODEL_VCALL_CFREE: g_assert (name != ""); break;
+ case MODEL_VCALL_CFREE: assert (name != ""); break;
// what type a vcall result is
- case MODEL_VCALL_RET: g_assert (name == ""); break;
+ case MODEL_VCALL_RET: assert (name == ""); break;
// how to convert the result of a vcall called "name" (optional: name if unused)
- case MODEL_VCALL_RCONV: g_assert (name != ""); break;
+ case MODEL_VCALL_RCONV: assert (name != ""); break;
// how to free (using GC) the result of the conversion (optional: "" if unused)
- case MODEL_VCALL_RFREE: g_assert (name != ""); break;
+ case MODEL_VCALL_RFREE: assert (name != ""); break;
}
switch (parser.typeOf (type))
diff --git a/sfi/sfidl-factory.cc b/sfi/sfidl-factory.cc
index 7b328a4..8c344cc 100644
--- a/sfi/sfidl-factory.cc
+++ b/sfi/sfidl-factory.cc
@@ -19,7 +19,7 @@ Factory::Factory()
Factory::~Factory()
{
list<Factory *>::iterator fi = find (factories->begin(), factories->end(), this);
- g_assert (fi != factories->end());
+ assert (fi != factories->end());
factories->erase (fi);
}
diff --git a/sfi/sfidl-namespace.cc b/sfi/sfidl-namespace.cc
index 285a84f..19b1e6f 100644
--- a/sfi/sfidl-namespace.cc
+++ b/sfi/sfidl-namespace.cc
@@ -75,7 +75,7 @@ String NamespaceHelper::printableForm(String symbol)
while(!current.empty())
{
// namespace longer than symbol?
- g_assert (!symlist.empty());
+ assert (!symlist.empty());
if(*current.begin() == *symlist.begin())
{
diff --git a/sfi/sfifilecrawler.cc b/sfi/sfifilecrawler.cc
index 1d5144c..11fcc27 100644
--- a/sfi/sfifilecrawler.cc
+++ b/sfi/sfifilecrawler.cc
@@ -152,7 +152,7 @@ file_crawler_queue_readdir (SfiFileCrawler *self,
const gchar *file_pattern,
GFileTest file_test)
{
- g_assert (self->dhandle == NULL);
+ assert (self->dhandle == NULL);
if (strchr (file_pattern, '?') || strchr (file_pattern, '*'))
{
@@ -218,7 +218,7 @@ file_crawler_queue_abs_file_path (SfiFileCrawler *self,
{
gchar *sep, *p, *freeme, *tmp;
- g_assert (self->pdqueue == NULL && self->dlist == NULL && self->accu == NULL);
+ assert (self->pdqueue == NULL && self->dlist == NULL && self->accu == NULL);
freeme = p = g_strdup (path_pattern);
@@ -275,7 +275,7 @@ file_crawler_queue_abs_file_path (SfiFileCrawler *self,
static void
file_crawler_crawl_abs_path (SfiFileCrawler *self)
{
- g_assert (self->pdqueue || self->dlist);
+ assert (self->pdqueue || self->dlist);
if (self->dhandle)
{
/* finish reading directory contents */
diff --git a/sfi/sfiglue.cc b/sfi/sfiglue.cc
index 5870828..da25643 100644
--- a/sfi/sfiglue.cc
+++ b/sfi/sfiglue.cc
@@ -13,7 +13,7 @@ static GQuark quark_context_stack = 0;
void
_sfi_init_glue (void)
{
- g_assert (quark_context_stack == 0);
+ assert (quark_context_stack == 0);
quark_context_stack = g_quark_from_static_string ("sfi-glue-context-stack");
}
void
@@ -150,7 +150,7 @@ sfi_glue_context_destroy (SfiGlueContext *context)
sfi_glue_context_push (context);
sfi_glue_gc_run ();
_sfi_glue_context_clear_proxies (context);
- g_assert (context->proxies == NULL);
+ assert (context->proxies == NULL);
sfi_glue_gc_run ();
sfi_glue_context_pop ();
destroy = context->table.destroy;
diff --git a/sfi/sfigluecodec.cc b/sfi/sfigluecodec.cc
index 8beb6b2..8b3fdfa 100644
--- a/sfi/sfigluecodec.cc
+++ b/sfi/sfigluecodec.cc
@@ -999,7 +999,7 @@ sfi_glue_decoder_dispatch (SfiGlueDecoder *decoder)
sfi_seq_unref (seq);
}
else
- g_assert (rvalue == NULL);
+ assert (rvalue == NULL);
}
/* queue emitted signals */
diff --git a/sfi/sfiparams.cc b/sfi/sfiparams.cc
index 085e6b6..32e5677 100644
--- a/sfi/sfiparams.cc
+++ b/sfi/sfiparams.cc
@@ -77,7 +77,7 @@ _sfi_init_params (void)
};
static GType pspec_types[7] = { 0, };
- g_assert (sfi__param_spec_types == NULL);
+ assert (sfi__param_spec_types == NULL);
sfi__param_spec_types = pspec_types;
diff --git a/sfi/sfiring.cc b/sfi/sfiring.cc
index 7ba241f..893b1a5 100644
--- a/sfi/sfiring.cc
+++ b/sfi/sfiring.cc
@@ -262,7 +262,7 @@ static inline SfiRing*
sfi_ring_unlink_node_dangling (SfiRing *head,
SfiRing *node)
{
- g_assert (head && node);
+ assert (head && node);
/* special case one item ring */
if (head->prev == head)
return NULL;
diff --git a/sfi/sfistore.cc b/sfi/sfistore.cc
index 3b3f507..4b4cc9a 100644
--- a/sfi/sfistore.cc
+++ b/sfi/sfistore.cc
@@ -307,7 +307,7 @@ sfi_wstore_flush_fd (SfiWStore *wstore,
n = bblock->reader (bblock->data, buffer, bsize);
if (n < 0)
break; // FIXME: error handling
- g_assert (n <= int (bsize));
+ assert (n <= int (bsize));
do
l = write (fd, buffer, n);
while (l < 0 && errno == EINTR);
diff --git a/sfi/sfitime.cc b/sfi/sfitime.cc
index 7c583d9..de4420d 100644
--- a/sfi/sfitime.cc
+++ b/sfi/sfitime.cc
@@ -35,7 +35,7 @@ _sfi_init_time (void)
time_t t;
gint error;
- g_assert (initialized++ == FALSE);
+ assert (initialized++ == FALSE);
tzset ();
error = gettimeofday (&tv, NULL);
diff --git a/sfi/sfivalues.cc b/sfi/sfivalues.cc
index 3db27cf..fd78bd5 100644
--- a/sfi/sfivalues.cc
+++ b/sfi/sfivalues.cc
@@ -86,7 +86,7 @@ _sfi_init_values (void)
};
static GType value_types[6] = { 0, };
- g_assert (sfi__value_types == NULL);
+ assert (sfi__value_types == NULL);
sfi__value_types = value_types;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]