[libpeas] Assert that no Lua values are leaked during initialize
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Assert that no Lua values are leaked during initialize
- Date: Tue, 20 Jan 2015 09:24:17 +0000 (UTC)
commit 5426f4686bfa6c3d1d656b1b66e8f5bf84847fa4
Author: Garrett Regier <garrettregier gmail com>
Date: Mon Jan 5 11:39:17 2015 -0800
Assert that no Lua values are leaked during initialize
loaders/lua5.1/peas-plugin-loader-lua.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/loaders/lua5.1/peas-plugin-loader-lua.c b/loaders/lua5.1/peas-plugin-loader-lua.c
index bc926a2..11e221b 100644
--- a/loaders/lua5.1/peas-plugin-loader-lua.c
+++ b/loaders/lua5.1/peas-plugin-loader-lua.c
@@ -515,6 +515,9 @@ peas_plugin_loader_lua_initialize (PeasPluginLoader *loader)
/* Pop lgi's module table */
lua_pop (L, 1);
+ /* Assert that no values were leaked to the stack */
+ g_assert_cmpint (lua_gettop (L), ==, 0);
+
/* Initially the lock is taken by LGI,
* release as we are not running Lua code
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]