Revision: 4423 http://geany.svn.sourceforge.net/geany/?rev=4423&view=rev Author: ntrel Date: 2009-11-12 12:39:36 +0000 (Thu, 12 Nov 2009)
Log Message: ----------- Make TagManager Assert statements cause g_warning on failure.
Modified Paths: -------------- trunk/ChangeLog trunk/tagmanager/ctags.c trunk/tagmanager/general.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-11-12 12:12:08 UTC (rev 4422) +++ trunk/ChangeLog 2009-11-12 12:39:36 UTC (rev 4423) @@ -1,3 +1,9 @@ +2009-11-12 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * tagmanager/ctags.c, tagmanager/general.h: + Make TagManager Assert statements cause g_warning on failure. + + 2009-11-10 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* tagmanager/perl.c:
Modified: trunk/tagmanager/ctags.c =================================================================== --- trunk/tagmanager/ctags.c 2009-11-12 12:12:08 UTC (rev 4422) +++ trunk/tagmanager/ctags.c 2009-11-12 12:39:36 UTC (rev 4423) @@ -1392,4 +1392,10 @@ } #endif
+/* wrap g_warning so we don't include glib.h for all parsers, to keep compat with CTags */ +void utils_warn(const char *msg) +{ + g_warning("%s", msg); +} + /* vi:set tabstop=8 shiftwidth=4: */
Modified: trunk/tagmanager/general.h =================================================================== --- trunk/tagmanager/general.h 2009-11-12 12:12:08 UTC (rev 4422) +++ trunk/tagmanager/general.h 2009-11-12 12:39:36 UTC (rev 4423) @@ -205,8 +205,9 @@ /* fake debug statement macro */ #define DebugStatement(x) ; #define PrintStatus(x) ; -#define Assert(x) ; - +/* wrap g_warning so we don't include glib.h for all parsers, to keep compat with CTags */ +void utils_warn(const char *msg); +#define Assert(x) if (!(x)) utils_warn("Assert(" #x ") failed!") /* * DATA DECLARATIONS */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.