Browse Source

interrogate: Fix invalid syntax for `make()` coerce ctor with kwargs

[skip ci]
rdb 3 years ago
parent
commit
11746457ff
1 changed files with 7 additions and 3 deletions
  1. 7 3
      dtool/src/interrogate/interfaceMakerPythonNative.cxx

+ 7 - 3
dtool/src/interrogate/interfaceMakerPythonNative.cxx

@@ -4707,9 +4707,13 @@ write_function_instance(ostream &out, FunctionRemap *remap,
     // The function handles the arguments by itself.
     // The function handles the arguments by itself.
     expected_params += "*args";
     expected_params += "*args";
     pexprs.push_back("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;
     num_params = 0;
   }
   }