Fix support for passing keyword arguments to methods named make()

such as *Attrib.make() and Shader.make()
This commit is contained in:
rdb 2016-10-13 00:21:03 +02:00
parent 7c45e891f5
commit 955ca0d334
2 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,7 @@ This issue fixes several bugs that were still found in 1.9.2.
* Fix mipmap filtering issues in tinydisplay renderer
* Fix exception when creating intervals before ShowBase is started
* Fix rare X11 .ico cursor bug; also now supports PNG-compressed icons
* Add keyword argument support to make() methods such as Shader.make()
------------------------ RELEASE 1.9.2 ------------------------

View File

@ -810,6 +810,11 @@ setup_properties(const InterrogateFunction &ifunc, InterfaceMaker *interface_mak
_flags |= F_coerce_constructor;
}
if (_args_type == InterfaceMaker::AT_varargs) {
// Of course methods named "make" can still take kwargs.
_args_type = InterfaceMaker::AT_keyword_args;
}
} else if (fname == "operator /") {
if (_has_this && _parameters.size() == 2 &&
TypeManager::is_float(_parameters[1]._remap->get_new_type())) {