Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Mon, 12 Oct 2015 17:20:02 UTC Commit: b2879e9fca00f544105029b45974bd808cbb9b7b https://github.com/geany/geany/commit/b2879e9fca00f544105029b45974bd808cbb9b...
Log Message: ----------- tagmanager: Fix handling of scopes starting with a non-ASCII character
Fix handling of scopes starting with a non-ASCII character.
Actually, just drop the check on the first byte of the scope, as it doesn't seem to serve any purpose as it only checks the first byte (so isn't any kind of real validation; and as it predates Geany it's impossible to know the real reason behind this check), and breaks support for non-ASCII scopes.
Modified Paths: -------------- tagmanager/src/tm_tag.c tests/ctags/Makefile.am tests/ctags/non-ascii-ident1.php tests/ctags/non-ascii-ident1.php.tags
Modified: tagmanager/src/tm_tag.c 4 lines changed, 1 insertions(+), 3 deletions(-) =================================================================== @@ -244,9 +244,7 @@ static gboolean tm_tag_init(TMTag *tag, TMSourceFile *file, const tagEntryInfo * if (NULL != tag_entry->extensionFields.arglist) tag->arglist = g_strdup(tag_entry->extensionFields.arglist); if ((NULL != tag_entry->extensionFields.scope[1]) && - (isalpha(tag_entry->extensionFields.scope[1][0]) || - tag_entry->extensionFields.scope[1][0] == '_' || - tag_entry->extensionFields.scope[1][0] == '$')) + (0 != tag_entry->extensionFields.scope[1][0])) tag->scope = g_strdup(tag_entry->extensionFields.scope[1]); if (tag_entry->extensionFields.inheritance != NULL) tag->inheritance = g_strdup(tag_entry->extensionFields.inheritance);
Modified: tests/ctags/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -226,6 +226,7 @@ test_sources = \ namespaces2.php \ namespaces.php \ no_terminator.js \ + non-ascii-ident1.php \ numlib.f90 \ objectivec_implementation.mm \ objectivec_interface.mm \
Modified: tests/ctags/non-ascii-ident1.php 12 lines changed, 12 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,12 @@ +<?php +class × { + private $r = 0; + public function __construct($a, $b) { + $this->r = $a * $b; + } + public function __toString() { + return (string) $this->r; + } +} + +echo new ×(2, 2);
Modified: tests/ctags/non-ascii-ident1.php.tags 5 lines changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,5 @@ +# format=tagmanager +__construct�16�($a, $b)��0 +__toString�16�()��0 +r�16384��0 +�1�0
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).