Home
last modified time | relevance | path

Searched refs:Py_True (Results 1 - 25 of 56) sorted by relevance

123

/third_party/python/Objects/
H A Dboolobject.c12 PyObject *res = self == Py_True ? &_Py_ID(True) : &_Py_ID(False); in bool_repr()
23 result = Py_True; in PyBool_FromLong()
30 /* We define bool_new to always return either Py_True or Py_False */
79 return PyBool_FromLong((a == Py_True) & (b == Py_True)); in bool_and()
87 return PyBool_FromLong((a == Py_True) | (b == Py_True)); in bool_or()
95 return PyBool_FromLong((a == Py_True) ^ (b == Py_True)); in bool_xor()
H A Dclassobject.c267 res = eq ? Py_True : Py_False; in method_richcompare()
269 res = eq ? Py_False : Py_True; in method_richcompare()
472 res = eq ? Py_True : Py_False; in instancemethod_richcompare()
474 res = eq ? Py_False : Py_True; in instancemethod_richcompare()
H A Dmethodobject.c314 res = eq ? Py_True : Py_False; in meth_richcompare()
316 res = eq ? Py_False : Py_True; in meth_richcompare()
H A Dobject.c94 * statically allocated singletons (like Py_True and Py_None).
694 res = (v == w) ? Py_True : Py_False; in do_richcompare()
697 res = (v != w) ? Py_True : Py_False; in do_richcompare()
755 ok = (res == Py_True); in PyObject_RichCompareBool()
1500 if (v == Py_True) in PyObject_IsTrue()
2459 return Py_Is(x, Py_True); in Py_IsTrue()
H A Dfileobject.c43 newline, closefd ? Py_True : Py_False); in PyFile_FromFd()
H A Dsliceobject.c589 res = Py_True; in slice_richcompare()
H A Dodictobject.c1490 if (op == Py_NE && cmp == Py_True) in odict_richcompare()
1499 res = (eq == (op == Py_EQ)) ? Py_True : Py_False; in odict_richcompare()
H A Dcodeobject.c1741 res = Py_True; in code_richcompare()
1750 res = Py_True; in code_richcompare()
2115 key = PyTuple_Pack(3, Py_TYPE(op), op, Py_True); in _PyCode_ConstantKey()
/third_party/python/Include/
H A Dboolobject.h14 /* Py_False and Py_True are the only two bools in existence.
23 #define Py_True ((PyObject *) &_Py_TrueStruct) macro
27 #define Py_IsTrue(x) Py_Is((x), Py_True)
33 /* Macros for returning Py_True or Py_False, respectively */
34 #define Py_RETURN_TRUE return Py_NewRef(Py_True)
/third_party/python/Modules/_io/
H A Diobase.c201 if (args == Py_True) { in _PyIOBase_check_closed()
236 rc = PyObject_SetAttr(self, &_Py_ID(__IOBase_closed), Py_True); in _io__IOBase_close_impl()
276 if (PyObject_SetAttr(self, &_Py_ID(_finalizing), Py_True)) in iobase_finalize()
382 if (res != Py_True) { in _PyIOBase_check_seekable()
387 if (args == Py_True) { in _PyIOBase_check_seekable()
415 if (res != Py_True) { in _PyIOBase_check_readable()
420 if (args == Py_True) { in _PyIOBase_check_readable()
448 if (res != Py_True) { in _PyIOBase_check_writable()
453 if (args == Py_True) { in _PyIOBase_check_writable()
H A D_iomodule.c331 closefd ? Py_True : Py_False, in _io_open_impl()
427 line_buffering ? Py_True : Py_False); in _io_open_impl()
H A Dbufferedio.c1227 if (_PyIOBase_check_seekable(self->raw, Py_True) == NULL) in _io__Buffered_seek_impl()
1422 if (_PyIOBase_check_readable(raw, Py_True) == NULL) in _io_BufferedReader___init___impl()
1777 if (_PyIOBase_check_writable(raw, Py_True) == NULL) in _io_BufferedWriter___init___impl()
2094 if (_PyIOBase_check_readable(reader, Py_True) == NULL) in _io_BufferedRWPair___init___impl()
2096 if (_PyIOBase_check_writable(writer, Py_True) == NULL) in _io_BufferedRWPair___init___impl()
2286 if (_PyIOBase_check_seekable(raw, Py_True) == NULL) in _io_BufferedRandom___init___impl()
2288 if (_PyIOBase_check_readable(raw, Py_True) == NULL) in _io_BufferedRandom___init___impl()
2290 if (_PyIOBase_check_writable(raw, Py_True) == NULL) in _io_BufferedRandom___init___impl()
H A Dtextio.c303 &_Py_ID(decode), input, final ? Py_True : Py_False, NULL); in _PyIncrementalNewlineDecoder_decode()
878 self->decoder, self->readtranslate ? Py_True : Py_False, NULL); in _textiowrapper_set_decoder()
897 eof ? Py_True : Py_False, NULL); in _textiowrapper_decode()
1452 else if (_PyIOBase_check_closed((PyObject *)self, Py_True) == NULL) \
1924 self->decoder, &_Py_ID(decode), bytes, Py_True, NULL); in _io_TextIOWrapper_read_impl()
2579 input_chunk, cookie.need_eof ? Py_True : Py_False, NULL); in _io_TextIOWrapper_seek_impl()
2806 self->decoder, &_Py_ID(decode), "yO", "", /* final = */ Py_True); in _io_TextIOWrapper_tell_impl()
/third_party/python/Modules/
H A D_abc.c601 result = Py_True; in _abc__abc_instancecheck_impl()
693 result = Py_True; in _abc__abc_subclasscheck_impl()
725 if (ok == Py_True) { in _abc__abc_subclasscheck_impl()
730 result = Py_True; in _abc__abc_subclasscheck_impl()
759 result = Py_True; in _abc__abc_subclasscheck_impl()
788 result = Py_True; in _abc__abc_subclasscheck_impl()
821 *result = Py_True; in subclasscheck_check_registry()
872 *result = Py_True; in subclasscheck_check_registry()
H A Dgetpath.c125 r = _Py_isabs(path) ? Py_True : Py_False;
158 r = Py_True;
183 (attr & FILE_ATTRIBUTE_DIRECTORY) ? Py_True : Py_False;
186 r = (_Py_wstat(path, &st) == 0) && S_ISDIR(st.st_mode) ? Py_True : Py_False;
209 !(attr & FILE_ATTRIBUTE_DIRECTORY) ? Py_True : Py_False;
212 r = (_Py_wstat(path, &st) == 0) && S_ISREG(st.st_mode) ? Py_True : Py_False;
240 ? Py_True : Py_False;
246 ? Py_True : Py_False;
H A D_testclinic.c193 PyObject *obj_a = a ? Py_True : Py_False; in bool_converter_impl()
194 PyObject *obj_b = b ? Py_True : Py_False; in bool_converter_impl()
195 PyObject *obj_c = c ? Py_True : Py_False; in bool_converter_impl()
1019 PyObject *obj_b = b ? Py_True : Py_False; in vararg_with_default_impl()
H A D_opcode.c52 else if (jump == Py_True) { in _opcode_stack_effect_impl()
H A Darraymodule.c710 res = Py_True; in array_richcompare()
734 PyObject *res = cmp ? Py_True : Py_False; in array_richcompare()
777 res = Py_True; in array_richcompare()
790 Py_INCREF(Py_True); in array_richcompare()
791 res = Py_True; in array_richcompare()
H A Dmain.c290 runargs = PyTuple_Pack(2, module, set_argv0 ? Py_True : Py_False); in pymain_run_module()
H A D_operator.c709 PyObject *result = Py_Is(a, b) ? Py_True : Py_False; in _operator_is__impl()
724 result = (a != b) ? Py_True : Py_False; in _operator_is_not_impl()
H A Dunicodedata.c914 result = (match == 0) ? Py_True : Py_False; in unicodedata_UCD_is_normalized_impl()
917 result = (m == YES) ? Py_True : Py_False; in unicodedata_UCD_is_normalized_impl()
/third_party/python/Python/
H A Dstructmember.c137 if (v == Py_True) in PyMember_SetOne()
H A D_warnings.c439 return PyDict_SetItem(registry, key, Py_True); in already_warned()
716 PyDict_SetItem(registry, key, Py_True) < 0) in warn_explicit()
H A Dmarshal.c370 else if (v == Py_True) { in w_object()
1042 Py_INCREF(Py_True); in r_object()
1043 retval = Py_True; in r_object()
/third_party/python/Modules/_decimal/
H A D_decimal.c119 Py_INCREF(Py_True); in incr_true()
120 return Py_True; in incr_true()
410 PyObject *b = flags&cm->flag ? Py_True : Py_False; in flags_as_dict()
639 res = (SdFlags(v)==SdFlags(w)) ^ (op==Py_NE) ? Py_True : Py_False; in signaldict_richcompare()
653 res = (SdFlags(v)==flags) ^ (op==Py_NE) ? Py_True : Py_False; in signaldict_richcompare()
6024 Py_INCREF(Py_True); in PyInit__decimal()
6025 CHECK_INT(PyModule_AddObject(m, "HAVE_CONTEXTVAR", Py_True)); in PyInit__decimal()
6027 Py_INCREF(Py_True); in PyInit__decimal()
6028 CHECK_INT(PyModule_AddObject(m, "HAVE_THREADS", Py_True)); in PyInit__decimal()

Completed in 45 milliseconds

123