[Github-comments] [geany/geany] Sync ctags main part (#1263)

Jiří Techet notifications at xxxxx
Tue Feb 14 16:02:05 UTC 2017


techee commented on this pull request.



> -	{
-		GStatBuf s;
-		
-		/* load file to memory and parse it from memory unless the file is too big */
-		if (g_stat(file_name, &s) != 0 || s.st_size > 10*1024*1024)
-			parse_file = TRUE;
-		else
-		{
-			if (!g_file_get_contents(file_name, (gchar**)&text_buf, (gsize*)&buf_size, NULL))
-			{
-				g_warning("Unable to open %s", file_name);
-				return FALSE;
-			}
-			free_buf = TRUE;
-		}
-	}

This is now done in ctags - see getMio(). The mem. size is just 1MB there instead of 10MB here but for normal sources it doesn't matter (and since ctags uses fgets() for input reading, even the file-based access is quite fast).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1263
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170214/e2b3c8b5/attachment.html>


More information about the Github-comments mailing list