Home
last modified time | relevance | path

Searched refs:Py_True (Results 1 – 25 of 60) sorted by relevance

123

/third_party/python/Objects/
Dboolobject.c16 if (self == Py_True) in bool_repr()
33 result = Py_True; in PyBool_FromLong()
65 return PyBool_FromLong((a == Py_True) & (b == Py_True)); in bool_and()
73 return PyBool_FromLong((a == Py_True) | (b == Py_True)); in bool_or()
81 return PyBool_FromLong((a == Py_True) ^ (b == Py_True)); in bool_xor()
Dclassobject.c267 res = eq ? Py_True : Py_False; in method_richcompare()
269 res = eq ? Py_False : Py_True; in method_richcompare()
498 res = eq ? Py_True : Py_False; in instancemethod_richcompare()
500 res = eq ? Py_False : Py_True; in instancemethod_richcompare()
Dmethodobject.c313 res = eq ? Py_True : Py_False; in meth_richcompare()
315 res = eq ? Py_False : Py_True; in meth_richcompare()
Dcodeobject.c743 key = PyTuple_Pack(3, Py_TYPE(op), op, Py_True); in _PyCode_ConstantKey()
886 res = Py_True; in code_richcompare()
895 res = Py_True; in code_richcompare()
Dobject.c688 res = (v == w) ? Py_True : Py_False; in do_richcompare()
691 res = (v != w) ? Py_True : Py_False; in do_richcompare()
749 ok = (res == Py_True); in PyObject_RichCompareBool()
1396 if (v == Py_True) in PyObject_IsTrue()
Dfileobject.c44 newline, closefd ? Py_True : Py_False); in PyFile_FromFd()
Dsliceobject.c579 res = Py_True; in slice_richcompare()
/third_party/python/Include/
Dboolobject.h22 #define Py_True ((PyObject *) &_Py_TrueStruct) macro
25 #define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True
/third_party/python/Doc/c-api/
Dbool.rst9 two booleans, :const:`Py_False` and :const:`Py_True`. As such, the normal
26 .. c:var:: PyObject* Py_True
40 Return :const:`Py_True` from a function, properly incrementing its reference
46 Return a new reference to :const:`Py_True` or :const:`Py_False` depending on the
/third_party/python/Modules/_io/
Diobase.c206 if (args == Py_True) { in _PyIOBase_check_closed()
241 rc = _PyObject_SetAttrId(self, &PyId___IOBase_closed, Py_True); in _io__IOBase_close_impl()
282 if (_PyObject_SetAttrId(self, &PyId__finalizing, Py_True)) in iobase_finalize()
387 if (res != Py_True) { in _PyIOBase_check_seekable()
392 if (args == Py_True) { in _PyIOBase_check_seekable()
420 if (res != Py_True) { in _PyIOBase_check_readable()
425 if (args == Py_True) { in _PyIOBase_check_readable()
453 if (res != Py_True) { in _PyIOBase_check_writable()
458 if (args == Py_True) { in _PyIOBase_check_writable()
Dbufferedio.c1241 if (_PyIOBase_check_seekable(self->raw, Py_True) == NULL) in _io__Buffered_seek_impl()
1436 if (_PyIOBase_check_readable(raw, Py_True) == NULL) in _io_BufferedReader___init___impl()
1781 if (_PyIOBase_check_writable(raw, Py_True) == NULL) in _io_BufferedWriter___init___impl()
2099 if (_PyIOBase_check_readable(reader, Py_True) == NULL) in _io_BufferedRWPair___init___impl()
2101 if (_PyIOBase_check_writable(writer, Py_True) == NULL) in _io_BufferedRWPair___init___impl()
2290 if (_PyIOBase_check_seekable(raw, Py_True) == NULL) in _io_BufferedRandom___init___impl()
2292 if (_PyIOBase_check_readable(raw, Py_True) == NULL) in _io_BufferedRandom___init___impl()
2294 if (_PyIOBase_check_writable(raw, Py_True) == NULL) in _io_BufferedRandom___init___impl()
D_iomodule.c386 closefd ? Py_True : Py_False, in _io_open_impl()
482 line_buffering ? Py_True : Py_False); in _io_open_impl()
Dtextio.c322 _PyIO_str_decode, input, final ? Py_True : Py_False, NULL); in _PyIncrementalNewlineDecoder_decode()
887 self->decoder, self->readtranslate ? Py_True : Py_False, NULL); in _textiowrapper_set_decoder()
906 eof ? Py_True : Py_False, NULL); in _textiowrapper_decode()
1489 else if (_PyIOBase_check_closed((PyObject *)self, Py_True) == NULL) \
1947 self->decoder, _PyIO_str_decode, bytes, Py_True, NULL); in _io_TextIOWrapper_read_impl()
2597 input_chunk, cookie.need_eof ? Py_True : Py_False, NULL); in _io_TextIOWrapper_seek_impl()
2824 self->decoder, &PyId_decode, "yO", "", /* final = */ Py_True); in _io_TextIOWrapper_tell_impl()
/third_party/python/Modules/
D_abc.c538 result = Py_True; in _abc__abc_instancecheck_impl()
630 result = Py_True; in _abc__abc_subclasscheck_impl()
662 if (ok == Py_True) { in _abc__abc_subclasscheck_impl()
667 result = Py_True; in _abc__abc_subclasscheck_impl()
696 result = Py_True; in _abc__abc_subclasscheck_impl()
725 result = Py_True; in _abc__abc_subclasscheck_impl()
758 *result = Py_True; in subclasscheck_check_registry()
809 *result = Py_True; in subclasscheck_check_registry()
D_opcode.c50 else if (jump == Py_True) { in _opcode_stack_effect_impl()
Dparsermodule.c516 res = (self->st_type == PyST_EXPR) ? Py_True : Py_False; in parser_isexpr()
539 res = (self->st_type == PyST_EXPR) ? Py_False : Py_True; in parser_issuite()
1088 if ((newargs = PyTuple_Pack(2, st, Py_True)) == NULL) in parser__pickler()
Darraymodule.c690 res = Py_True; in array_richcompare()
714 PyObject *res = cmp ? Py_True : Py_False; in array_richcompare()
757 res = Py_True; in array_richcompare()
770 Py_INCREF(Py_True); in array_richcompare()
771 res = Py_True; in array_richcompare()
Dunicodedata.c906 result = (match == 0) ? Py_True : Py_False; in unicodedata_UCD_is_normalized_impl()
909 result = (m == YES) ? Py_True : Py_False; in unicodedata_UCD_is_normalized_impl()
Dmain.c281 runargs = PyTuple_Pack(2, module, set_argv0 ? Py_True : Py_False); in pymain_run_module()
D_json.c1318 else if (obj == Py_True) { in _encoded_const()
1403 if (obj == Py_None || obj == Py_True || obj == Py_False) { in encoder_listencode_obj()
1573 else if (key == Py_True || key == Py_False || key == Py_None) { in encoder_listencode_dict()
/third_party/python/Python/
Dstructmember.c132 if (v == Py_True) in PyMember_SetOne()
Dmarshal.c363 else if (v == Py_True) { in w_object()
987 Py_INCREF(Py_True); in r_object()
988 retval = Py_True; in r_object()
Dceval.c1581 Py_INCREF(Py_True); in _PyEval_EvalFrameDefault()
1582 SET_TOP(Py_True); in _PyEval_EvalFrameDefault()
3021 PyObject *b = res ? Py_True : Py_False; in _PyEval_EvalFrameDefault()
3040 PyObject *b = (res^oparg) ? Py_True : Py_False; in _PyEval_EvalFrameDefault()
3149 if (cond == Py_True) { in _PyEval_EvalFrameDefault()
3177 if (cond == Py_True) { in _PyEval_EvalFrameDefault()
3197 if (cond == Py_True) { in _PyEval_EvalFrameDefault()
3226 if (cond == Py_True) { in _PyEval_EvalFrameDefault()
/third_party/python/Modules/_sqlite/
Dmodule.c119 result = Py_True; in module_complete()
/third_party/python/Modules/_decimal/
D_decimal.c116 Py_INCREF(Py_True); in incr_true()
117 return Py_True; in incr_true()
407 PyObject *b = flags&cm->flag ? Py_True : Py_False; in flags_as_dict()
636 res = (SdFlags(v)==SdFlags(w)) ^ (op==Py_NE) ? Py_True : Py_False; in signaldict_richcompare()
650 res = (SdFlags(v)==flags) ^ (op==Py_NE) ? Py_True : Py_False; in signaldict_richcompare()
5856 Py_INCREF(Py_True); in PyInit__decimal()
5857 CHECK_INT(PyModule_AddObject(m, "HAVE_CONTEXTVAR", Py_True)); in PyInit__decimal()
5859 Py_INCREF(Py_True); in PyInit__decimal()
5860 CHECK_INT(PyModule_AddObject(m, "HAVE_THREADS", Py_True)); in PyInit__decimal()

123