You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scanner_t.startElement method contains the following code:
rm1 = "f1" not in self.config.flags
names = [
"__va_list_tag",
"__NSConstantString_tag",
"__NSConstantString"]
if isinstance(obj, declarations.declaration_t):
if rm1 and str(obj.name) in names:
return
I completely don't understand the comment, it explains what it does, but not why.
Second, this code creates incomplete declarations tree. For example, if a function uses "va_list" as the argument, the declarations tree will contain reference to unknown_t class instance. Thus preventing me to find out those functions. In my opinion this code does not belong to the scanner, but the user code. Also, even in case you have a very good reason to filter it, by default pygccxml should provide the view to the tree exactly as it was generated by castxml/gccxml.
The patch is trivial: in my opinion, the code should be deleted.
Regards,
Roman
The text was updated successfully, but these errors were encountered:
When I added support for castxml 1 or 2 years ago, these declarations appeared in the xml tree, because they are exposed by clang/llvm. It broke some tests in pygccxml, and broke pyplusplus. So I decided to filter them out. This is helpful for beginners because if they loop over the declarations, they will not be confused too much.
Of course, you can disable that feature, and pass the "f1" flag to the config. These declarations will no more be filtered out. I hope that helps.
Of course I would be really pleased to know when you need access to these declarations, because until now for me these declarations are really mysterious. When are you explicitly writing c++ code using __va_list_tag or one of the others?
The library uses it in the code:
__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list);
ctypes does not support such functions. So the code generator needs to find all such functions (... or va_list) and exclude them. But it is unable to do this, since the variable type is "unknown".
Hello.
scanner_t.startElement method contains the following code:
I completely don't understand the comment, it explains what it does, but not why.
Second, this code creates incomplete declarations tree. For example, if a function uses "va_list" as the argument, the declarations tree will contain reference to unknown_t class instance. Thus preventing me to find out those functions. In my opinion this code does not belong to the scanner, but the user code. Also, even in case you have a very good reason to filter it, by default pygccxml should provide the view to the tree exactly as it was generated by castxml/gccxml.
The patch is trivial: in my opinion, the code should be deleted.
Regards,
Roman
The text was updated successfully, but these errors were encountered: