Giter VIP home page Giter VIP logo

Comments (6)

trolldbois avatar trolldbois commented on August 29, 2024

mhh sorry, HEAD was not very stable over the week end.
should be ok now.
But because I shuffled a lot of code around it might be a bug.
can you try your test case after pulling HEAD ?

There is also a version clang 3.4-dev-20130913 of python-clang that i pushed into pypi a few days ago.
its just a small API upgrade that is not elated to the error above.

from ctypeslib.

chmod007 avatar chmod007 commented on August 29, 2024

Hm, I run:

DYLD_LIBRARY_PATH=/usr/local/llvm/lib python test/test_codegen.py

and still get:

File "/private/tmp/ctypeslib/ctypeslib/codegen/clangparser.py", line 224, in get_unique_name
_id = cursor.get_usr()
AttributeError: 'Type' object has no attribute 'get_usr'


Ran 25 tests in 0.689s

FAILED (errors=19, skipped=1, expected failures=5)

Do the tests pass for you?

from ctypeslib.

trolldbois avatar trolldbois commented on August 29, 2024

yes they pass ( most of them anyway )
i'm using libclang 1:3.4svn190794-1exp1 from llvm.org
and python-clang 3.4-dev-20130913

can you copy/paste the full exception traceback ?
I need it to debug the caller of get_unique_name

from ctypeslib.

trolldbois avatar trolldbois commented on August 29, 2024

you definitively hit the bug because your python-clang does not support Type.spelling
I added that in a a recent release trolldbois/python-clang@b95b7b6

from ctypeslib.

chmod007 avatar chmod007 commented on August 29, 2024

ERROR: test_wchar (main.ConstantsTest)

Traceback (most recent call last):
File "test/test_codegen.py", line 99, in test_wchar
""", ['-x','c++']) # force c++ lang for wchar
File "/private/tmp/ctypeslib/test/util.py", line 145, in convert
self.gen(hfile, flags)
File "/private/tmp/ctypeslib/test/util.py", line 118, in gen
self.parser.parse(fname)
File "/private/tmp/ctypeslib/ctypeslib/codegen/clangparser.py", line 170, in parse
self.startElement( node )
File "/private/tmp/ctypeslib/ctypeslib/codegen/clangparser.py", line 183, in startElement
stop_recurse = mth(node)
File "/private/tmp/ctypeslib/ctypeslib/codegen/clangparser.py", line 49, in fn
return func(_args, *_kwargs)
File "/private/tmp/ctypeslib/ctypeslib/codegen/clangparser.py", line 572, in TYPEDEF_DECL
p_type = self.parse_cursor_type(_type)
File "/private/tmp/ctypeslib/ctypeslib/codegen/clangparser.py", line 331, in parse_cursor_type
return mth(_cursor_type)
File "/private/tmp/ctypeslib/ctypeslib/codegen/clangparser.py", line 42, in fn
name = args[0].get_unique_name(args[1])
File "/private/tmp/ctypeslib/ctypeslib/codegen/clangparser.py", line 224, in get_unique_name
_id = cursor.get_usr()
AttributeError: 'Type' object has no attribute 'get_usr'

from ctypeslib.

chmod007 avatar chmod007 commented on August 29, 2024

Yup, that did it, thanks! Now only three failing cases.

from ctypeslib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.