Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit 4a950be

Browse files
Support: simplifying tuple creation
1 parent 5294663 commit 4a950be

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pylib/support.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ static PyObject* _setup_module(PyObject* module) {
7070
PyObject* collections = PyImport_ImportModule("collections");
7171

7272
// Set up a Command namedtuple object, with empty default for heredocs substructure.
73-
PyObject* defaults = PyTuple_New(1);
74-
PyObject* default_heredoc = PyTuple_New(0);
75-
PyTuple_SetItem(defaults, 0, default_heredoc);
73+
PyObject* defaults = Py_BuildValue("(())");
7674
PyObject *args = Py_BuildValue("ss", "Command", "cmd sub_cmd json original start_line end_line flags value heredocs");
7775
PyObject *keywords = PyDict_New();
7876
PyDict_SetItemString(keywords, "defaults", defaults);

0 commit comments

Comments
 (0)