Revision: 5910 http://geany.svn.sourceforge.net/geany/?rev=5910&view=rev Author: colombanw Date: 2011-09-12 16:58:31 +0000 (Mon, 12 Sep 2011) Log Message: ----------- Fix updating symbol list for overloaded C++ symbols
When searching for an old entry to reuse when updating an existing symbol list, take into account the symbol's argument list not to always match the same entry for overloaded symbols.
Closes #3406644.
Modified Paths: -------------- trunk/ChangeLog trunk/src/symbols.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-09-11 17:06:11 UTC (rev 5909) +++ trunk/ChangeLog 2011-09-12 16:58:31 UTC (rev 5910) @@ -1,3 +1,10 @@ +2011-09-12 Colomban Wendling <colomban(at)geany(dot)org> + + * src/symbols.c: + Fix updating symbol list for overloaded C++ symbols (closes + #3406644). + + 2011-09-02 Colomban Wendling <colomban(at)geany(dot)org>
* src/ui_utils.c:
Modified: trunk/src/symbols.c =================================================================== --- trunk/src/symbols.c 2011-09-11 17:06:11 UTC (rev 5909) +++ trunk/src/symbols.c 2011-09-12 16:58:31 UTC (rev 5910) @@ -1191,7 +1191,9 @@ const TMTag *t2 = v2;
return (t1->type == t2->type && strcmp(t1->name, t2->name) == 0 && - utils_str_equal(t1->atts.entry.scope, t2->atts.entry.scope)); + utils_str_equal(t1->atts.entry.scope, t2->atts.entry.scope) && + /* include arglist in match to support e.g. C++ overloading */ + utils_str_equal(t1->atts.entry.arglist, t2->atts.entry.arglist)); }
@@ -1210,6 +1212,12 @@ for (p = tag->atts.entry.scope; *p != '\0'; p++) h = (h << 5) + h + *p; } + /* for e.g. C++ overloading */ + if (tag->atts.entry.arglist) + { + for (p = tag->atts.entry.arglist; *p != '\0'; p++) + h = (h << 5) + h + *p; + }
return h; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.