universal-ctags / python-ctags3 Goto Github PK
View Code? Open in Web Editor NEWThis project forked from sbraz/python-ctags
Actively maintained fork of python-ctags with Python 3 support
License: GNU Lesser General Public License v3.0
This project forked from sbraz/python-ctags
Actively maintained fork of python-ctags with Python 3 support
License: GNU Lesser General Public License v3.0
It's a bit unusual and could be confusing for users to have py3
as default branch instead of master
, don't you think?
AllocBuffer rpc/impl.c/^void AllocBuffer(MESSAGE_BUFFER_S *const MsgBuffer, uint32_t opCode, $/;" f line:502 typeref:typename:void end:516 <--------- This param
Here, I am interested in fetching the "end" parameter from the lines where it is present, but the python examples and documentation do not present any option to do so.
First, many thanks for maintaining this library, it is proving very useful for the application I am developing. I have had a few issues with the library when running on OSX though. I am using the linux kernel 4.4.0 source as test data and it had issues when processing the tags of drivers/dma/at_hdma.c. I have narrowed it down to a single line in the tag file which I have attached below (that's not to say that other lines don't suffer the same fate). The issue only appears to affect the library when installed using pip3 (installing version v1.2.3), the issue is not present when installed using the makefile from cloning the git repository.
The segfault occurs inside the strncmp call in parseTagLine. Comparing the function in v1.2.3 and the head, it looks like the logic has been changed to use a new function countContinuousBackslashesBackward. Are there plans to release a new version containing this fix which can be installed using pip3 rather than by cloning the repo? Is there any errata to which this defective edge case could be added so that others can quickly identify should they encounter the same problem?
Hey @jonashaag,
Can you please release a new version with the regenerated extension (I pushed a few commits) ? I need it for Python 3.9 support.
I added a new test suite under the tests/
directory; however I just noticed there's a test suite under src/tests/
. Merge the two and integrate them into Travis.
I've added the tests to MANIFEST.in, can you release this as 1.2.2?
Double backslashes at the end of pattern can crash readtags.c.
[yamato@x201]~/var/python-ctags3/src/examples% git diff tags
diff --git a/src/examples/tags b/src/examples/tags
index 02ebfd5..70e5d33 100644
--- a/src/examples/tags
+++ b/src/examples/tags
@@ -281,7 +281,7 @@ file ../include/readtags.h /^ const char *file;$/;" kind:member line:112 languag
file ../include/readtags.h /^ } file;$/;" kind:member line:72 language:C++ struct:__anon9 typeref:struct:__anon9::__anon11 access:public
fileScope ../include/readtags.h /^ short fileScope;$/;" kind:member line:129 language:C++ struct:__anon14 access:public
find ../readtags.c /^static tagResult find (tagFile *const file, tagEntry *const entry,$/;" kind:function line:649 language:C file: signature:(tagFile *const file, tagEntry *const entry, const char *const name, const int options)
-findBinary ../readtags.c /^static tagResult findBinary (tagFile *const file)$/;" kind:function line:592 language:C file: signature:(tagFile *const file)
+findBinary ../readtags.c /^static tagResult findBinary (tagFile *const file)\\/;" kind:function line:592 language:C file: signature:(tagFile *const file)
findFirstMatchBefore ../readtags.c /^static tagResult findFirstMatchBefore (tagFile *const file)$/;" kind:function line:577 language:C file: signature:(tagFile *const file)
findFirstNonMatchBefore ../readtags.c /^static void findFirstNonMatchBefore (tagFile *const file)$/;" kind:function line:559 language:C file: signature:(tagFile *const file)
findNext ../readtags.c /^static tagResult findNext (tagFile *const file, tagEntry *const entry)$/;" kind:function line:689 language:C file: signature:(tagFile *const file, tagEntry *const entry)
[yamato@x201]~/var/python-ctags3/src/examples% python ./example.py tags
Exuberant Ctags
Darren Hiebert
2
DL_EXPORT
macro
found
649
/^static tagResult find (tagFile *const file, tagEntry *const entry,$/
function
zsh: segmentation fault (core dumped) python ./example.py tags
This is spotted at universal-ctags project(http://ctags.io) and I fixed this bug.
If this bug is reproduced in python-ctags3, could you consider to cherry-pick universal-ctags/ctags@42d50f3 ?
Hi Jonas, it seems you forgot to push the commit which adds version 1.2.4 to setup.py and the associated tag. Can you do it?
Hi @jonashaag,
The current PyPI tarball doesn't work with Python 3.11:
x86_64-pc-linux-gnu-gcc -Wsign-compare -DNDEBUG -O2 -pipe -march=native -fPIC -Isrc/include -I/usr/include/python3.11 -c src/_readtags.c -o build/temp.linux-x86_64-cpython-311/src/_readtags.o
src/_readtags.c:196:12: fatal error: longintrepr.h: No such file or directory
196 | #include "longintrepr.h"
| ^~~~~~~~~~~~~~~
Regenerating _readtags.c
with a recent Cython version works, can you please do it and upload a new release on PyPI?
Travis doesn't work anymore, we don't have functional CI right now.
I don't have time to work on this right now.
HI, again.
Not to force a person like you extracting readtags.c from the ctags repository when I change readtags.c, I made a separated repository for readtags.c spin-off'ed from the ctags repository. Please, see https://github.com/universal-ctags/libreadtags .
I think python-ctags3 is not enough major for its great usefulness. Many people though tags file can be used via vim or editors. They don't know interesting command line based application like universal-ctags/ctags#3043 .
How do you think running this repo at Universal Ctags organization (https://github.com/universal-ctags) ?
universal-ctags becomes popular. So more people may visit the organization page and find python-ctags3.
It means you will find more bug reports but you may get contributions.
Note: even if you use readtags.c of the libreadtags, you can read a tags file generated by Exuberant Ctags.
I'm not good at English. So forgive me if I use impolite expressions.
Originally posted by @masatake in #7 (comment)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.