Skip to content

Commit 955ca0d

Browse files
committed
Fix support for passing keyword arguments to methods named make()
such as *Attrib.make() and Shader.make()
1 parent 7c45e89 commit 955ca0d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

doc/ReleaseNotes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ This issue fixes several bugs that were still found in 1.9.2.
4242
* Fix mipmap filtering issues in tinydisplay renderer
4343
* Fix exception when creating intervals before ShowBase is started
4444
* Fix rare X11 .ico cursor bug; also now supports PNG-compressed icons
45+
* Add keyword argument support to make() methods such as Shader.make()
4546

4647
------------------------ RELEASE 1.9.2 ------------------------
4748

dtool/src/interrogate/functionRemap.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,11 @@ setup_properties(const InterrogateFunction &ifunc, InterfaceMaker *interface_mak
810810
_flags |= F_coerce_constructor;
811811
}
812812

813+
if (_args_type == InterfaceMaker::AT_varargs) {
814+
// Of course methods named "make" can still take kwargs.
815+
_args_type = InterfaceMaker::AT_keyword_args;
816+
}
817+
813818
} else if (fname == "operator /") {
814819
if (_has_this && _parameters.size() == 2 &&
815820
TypeManager::is_float(_parameters[1]._remap->get_new_type())) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy