From 11746457ff31f373ff7ae25adb365f334443230f Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 7 Nov 2022 18:02:43 +0100 Subject: [PATCH] interrogate: Fix invalid syntax for `make()` coerce ctor with kwargs [skip ci] --- dtool/src/interrogate/interfaceMakerPythonNative.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index a767b62309..eb930185e6 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -4707,9 +4707,13 @@ write_function_instance(ostream &out, FunctionRemap *remap, // The function handles the arguments by itself. expected_params += "*args"; pexprs.push_back("args"); - if (args_type == AT_keyword_args) { - expected_params += ", **kwargs"; - pexprs.push_back("kwds"); + if (remap->_args_type == AT_keyword_args) { + if (args_type == AT_keyword_args) { + expected_params += ", **kwargs"; + pexprs.push_back("kwds"); + } else { + pexprs.push_back("nullptr"); + } } num_params = 0; }