[gjs] gi: assert all arguments are processed prior to invoking the function
- From: Johan Dahlin <johan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] gi: assert all arguments are processed prior to invoking the function
- Date: Tue, 2 Mar 2010 19:05:24 +0000 (UTC)
commit 2a5dbdbdf04a920e2491b99b06eff7174e31c97d
Author: Tommi Komulainen <tko litl com>
Date: Tue Mar 2 13:26:45 2010 +0000
gi: assert all arguments are processed prior to invoking the function
https://bugzilla.gnome.org/show_bug.cgi?id=611603
gi/function.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gi/function.c b/gi/function.c
index 8b4f02f..051c7d8 100644
--- a/gi/function.c
+++ b/gi/function.c
@@ -685,7 +685,9 @@ gjs_invoke_c_function(JSContext *context,
in_args_pos++;
}
- g_assert(in_args_pos == (guint8)function->invoker.cif.nargs);
+ g_assert_cmpuint(in_args_pos, ==, (guint8)function->invoker.cif.nargs);
+ g_assert_cmpuint(inout_args_pos, ==, inout_args_len);
+ g_assert_cmpuint(out_args_pos, ==, out_args_len);
ffi_call(&(function->invoker.cif), function->invoker.native_address, &return_value, in_arg_pointers);
/* Return value and out arguments are valid only if invocation doesn't
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]