[Lxr-dev] [ lxr-Bugs-469413 ] Non-symbols can be mistaken for symbols
Brought to you by:
ajlittoz
From: SourceForge.net <no...@so...> - 2009-04-22 20:08:21
|
Bugs item #469413, was opened at 2001-10-09 06:38 Message generated for change (Comment added) made by adrianissott You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=469413&group_id=27350 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Database interface Group: current cvs Status: Open Resolution: None Priority: 3 Private: No Submitted By: Malcolm Box (mbox) Assigned to: AdrianIssott (adrianissott) Summary: Non-symbols can be mistaken for symbols Initial Comment: When marking up source code, each possible string is checked to see if it is a symbol, by calling issymbol(). The implementations in Mysql.pm and Postgres.pm only use the string to lookup whether this is a symbol. Unfortunately it is possible that in one release a string is a symbol, while in another it is not. Since the release of the file being looked at is not taken into account, the current algorithm will highlight symbols that, when clicked on, will return "Not used". The solution is to change issymbol to do: select s.symid from symbols s, releases r, indexes i where s.symname = 'name' and i.symid = s.symid and i.fileid = r.fileid and r.release = 'release'; This is not much slower, and the results could be cached. Note that is problem shows up only rarely, since it is unusual to have a string that both resembles an identifier (not a reserved word, not a string/include token) but matches a symbol name in another release. The easiest way to show it up is to look at the source of a release that has not be indexed yet. ---------------------------------------------------------------------- >Comment By: AdrianIssott (adrianissott) Date: 2009-04-22 21:08 Message: Malcolm, I'm happy to take this on as it was implicitly what I was going to do anyway :) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=469413&group_id=27350 |