davidmalcolm / gcc-python-plugin

GCC plugin that embeds CPython inside the compiler
GNU General Public License v3.0
197 stars 58 forks source link

add is_variadic attribute to function and method types #102

Closed davidmalcolm closed 7 years ago

davidmalcolm commented 7 years ago

It would be handy to have an is_variadic attribute on function and method types. I don't think there's any way at present to tell if a function is variadic. This patch adds the code but, sorry, I didn't write tests or docs yet.

davidmalcolm commented 7 years ago

Imported from trac issue 61. Created by tromey on 2015-01-30T16:01:44, last modified: 2015-11-22T22:12:10

davidmalcolm commented 7 years ago

Trac comment by tromey on 2015-02-04 12:43:24:

This new patch adds documentation and a test case.

One thing you may wish to consider is whether the "..." argument ought to show up in the function type's argument_types attribute. For simplicity I chose to leave this out, but it's worth considering both approaches.

davidmalcolm commented 7 years ago

Trac comment by tromey on 2015-11-22 22:12:10:

This is fixed now.