]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/python: keyword args for Color.__init__
authorAndrew Burgess <aburgess@redhat.com>
Wed, 23 Apr 2025 09:07:09 +0000 (10:07 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Wed, 23 Apr 2025 23:13:23 +0000 (00:13 +0100)
commit2eead96aeba1ec15d258b0952b37cb5d8bfc4c4a
tree15bba79331ea10abb662b539cf66b9853cfa3052
parent94f3facb2185f780b9b971330277c6d89ad8c053
gdb/python: keyword args for Color.__init__

GDB's Python API documentation is clear:

     Functions and methods which have two or more optional arguments allow
  them to be specified using keyword syntax.

The gdb.Color.__init__ method matches this description, but doesn't
support keyword arguments.

This commit fixes this by adding keyword argument support.

There's a new test to cover this functionality.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/python/py-color.c
gdb/testsuite/gdb.python/py-color.exp