Skip to content

Commit d1d858f

Browse files
committed
Use stdbool
1 parent d829a17 commit d1d858f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Python/bltinmodule.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* Built-in functions */
22

3+
#include <stdbool.h>
34
#include "Python.h"
45
#include "pycore_ast.h" // _PyAST_Validate()
56
#include "pycore_call.h" // _PyObject_CallNoArgs()
@@ -1303,7 +1304,7 @@ typedef struct {
13031304
PyObject_HEAD
13041305
PyObject *iters;
13051306
PyObject *func;
1306-
int strict;
1307+
bool strict;
13071308
} mapobject;
13081309

13091310
static PyObject *
@@ -1312,7 +1313,7 @@ map_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
13121313
PyObject *it, *iters, *func;
13131314
mapobject *lz;
13141315
Py_ssize_t numargs, i;
1315-
int strict = 0;
1316+
bool strict = false;
13161317

13171318
if (kwds) {
13181319
PyObject *empty = PyTuple_New(0);
@@ -1403,7 +1404,7 @@ map_vectorcall(PyObject *type, PyObject * const*args,
14031404
}
14041405
lz->iters = iters;
14051406
lz->func = Py_NewRef(args[0]);
1406-
lz->strict = 0;
1407+
lz->strict = false;
14071408

14081409
return (PyObject *)lz;
14091410
}
@@ -2950,7 +2951,7 @@ typedef struct {
29502951
Py_ssize_t tuplesize;
29512952
PyObject *ittuple; /* tuple of iterators */
29522953
PyObject *result;
2953-
int strict;
2954+
bool strict;
29542955
} zipobject;
29552956

29562957
static PyObject *
@@ -2961,7 +2962,7 @@ zip_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
29612962
PyObject *ittuple; /* tuple of iterators */
29622963
PyObject *result;
29632964
Py_ssize_t tuplesize;
2964-
int strict = 0;
2965+
bool strict = false;
29652966

29662967
if (kwds) {
29672968
PyObject *empty = PyTuple_New(0);

0 commit comments

Comments
 (0)