Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed fail on processing headers with substring 'type' in their names #218

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

petrom
Copy link

@petrom petrom commented Apr 7, 2014

Hi @scopatz. We are using xdress to create python bindings for sdk written in 'c' and faced with issue when xdress fails on processing 'c' headers with 'type' in their names (e.g. we have types.h in our sdk). In such case module description is considered as variable description. I added additional verification for it, but not sure that it's right solution.

@scopatz
Copy link
Member

scopatz commented Apr 8, 2014

This seems to be dependent on #219.

@@ -216,7 +216,7 @@ def touch(filename):
def isvardesc(desc):
"""Tests if a description is a variable-type description."""
return desc is not None and 'type' in desc and 'signatures' not in desc and \
'methods' not in desc
'methods' not in desc and not isinstance(desc, str)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use basestring here instead of str. (In Python3, basestring is defined to be str.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants