SF.net SVN: geany: [1580] trunk/src

ntrel at users.sourceforge.net ntrel at xxxxx
Sat May 26 15:26:06 UTC 2007


Revision: 1580
          http://svn.sourceforge.net/geany/?rev=1580&view=rev
Author:   ntrel
Date:     2007-05-26 08:26:05 -0700 (Sat, 26 May 2007)

Log Message:
-----------
Use filetype_has_tags().

Modified Paths:
--------------
    trunk/src/filetypes.c
    trunk/src/symbols.c

Modified: trunk/src/filetypes.c
===================================================================
--- trunk/src/filetypes.c	2007-05-26 15:09:06 UTC (rev 1579)
+++ trunk/src/filetypes.c	2007-05-26 15:26:05 UTC (rev 1580)
@@ -900,6 +900,8 @@
 // Indicates whether there is a tag parser for the filetype or not.
 gboolean filetype_has_tags(filetype *ft)
 {
+	g_return_val_if_fail(ft != NULL, FALSE);
+
 	return ft->lang >= 0;
 }
 

Modified: trunk/src/symbols.c
===================================================================
--- trunk/src/symbols.c	2007-05-26 15:09:06 UTC (rev 1579)
+++ trunk/src/symbols.c	2007-05-26 15:26:05 UTC (rev 1580)
@@ -693,7 +693,7 @@
 	}
 	g_free(shortname);
 
-	if (filetypes[FILETYPE_ID(ft)]->lang < 0)
+	if (ft == NULL || ! filetype_has_tags(ft))
 		return NULL;
 	return ft;
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list