Lines Matching defs:obj

391 pycompilestring(PyObject* self, PyObject *obj) {
392 if (PyBytes_CheckExact(obj) == 0) {
396 const char *the_string = PyBytes_AsString(obj);
407 PyObject *obj;
418 obj = PyObject_New(PyObject, type);
419 if (obj == NULL) {
431 Py_DECREF(obj);
435 hash = PyObject_Hash(obj);
441 Py_DECREF(obj);
449 Py_DECREF(obj);
457 Py_DECREF(obj);
461 Py_DECREF(obj);
1203 PyObject *obj = NULL;
1285 obj = PyObject_Str(instance);
1286 if (obj == NULL) {
1289 assert(strcmp(PyUnicode_AsUTF8(obj), "<test>") == 0);
1290 Py_CLEAR(obj);
1300 Py_XDECREF(obj);
1620 PyObject *obj;
1621 if (!PyArg_ParseTuple(args, "S", &obj))
1623 Py_INCREF(obj);
1624 return obj;
1630 PyObject *obj;
1631 if (!PyArg_ParseTuple(args, "Y", &obj))
1633 Py_INCREF(obj);
1634 return obj;
1640 PyObject *obj;
1641 if (!PyArg_ParseTuple(args, "U", &obj))
1643 Py_INCREF(obj);
1644 return obj;
1897 PyObject *tuple, *obj;
1904 obj = PyUnicode_Decode("t\xeate", strlen("t\xeate"),
1906 if (obj == NULL)
1909 PyTuple_SET_ITEM(tuple, 0, obj);
2007 PyObject *tuple, *obj;
2019 obj = PyUnicode_Decode("test", strlen("test"),
2021 if (obj == NULL)
2024 PyTuple_SET_ITEM(tuple, 0, obj);
2030 if (value != PyUnicode_AS_UNICODE(obj))
2037 if (value != PyUnicode_AS_UNICODE(obj) ||
2038 len != PyUnicode_GET_SIZE(obj))
2050 PyObject *tuple, *obj;
2058 obj = PyUnicode_FromString("test");
2059 PyTuple_SET_ITEM(tuple, 0, obj);
2065 value2 = PyUnicode_AS_UNICODE(obj);
2071 if (value1 != PyUnicode_AS_UNICODE(obj))
2079 value2 = PyUnicode_AS_UNICODE(obj);
2089 if (value1 != PyUnicode_AS_UNICODE(obj) ||
2090 len1 != PyUnicode_GET_SIZE(obj))
2530 PyObject *obj;
2532 if (!PyArg_ParseTuple(args, "OO:exc_set_object", &exc, &obj)) {
2536 PyErr_SetObject(exc, obj);
2639 PyObject *obj; \
2641 if (!PyArg_ParseTuple(args, "O|p", &obj, &exact)) { \
2644 int rv = exact?exact_method(obj):check_method(obj); \
2970 test_PyDateTime_GET(PyObject *self, PyObject *obj)
2974 year = PyDateTime_GET_YEAR(obj);
2975 month = PyDateTime_GET_MONTH(obj);
2976 day = PyDateTime_GET_DAY(obj);
2982 test_PyDateTime_DATE_GET(PyObject *self, PyObject *obj)
2986 hour = PyDateTime_DATE_GET_HOUR(obj);
2987 minute = PyDateTime_DATE_GET_MINUTE(obj);
2988 second = PyDateTime_DATE_GET_SECOND(obj);
2989 microsecond = PyDateTime_DATE_GET_MICROSECOND(obj);
2990 PyObject *tzinfo = PyDateTime_DATE_GET_TZINFO(obj);
2996 test_PyDateTime_TIME_GET(PyObject *self, PyObject *obj)
3000 hour = PyDateTime_TIME_GET_HOUR(obj);
3001 minute = PyDateTime_TIME_GET_MINUTE(obj);
3002 second = PyDateTime_TIME_GET_SECOND(obj);
3003 microsecond = PyDateTime_TIME_GET_MICROSECOND(obj);
3004 PyObject *tzinfo = PyDateTime_TIME_GET_TZINFO(obj);
3010 test_PyDateTime_DELTA_GET(PyObject *self, PyObject *obj)
3014 days = PyDateTime_DELTA_GET_DAYS(obj);
3015 seconds = PyDateTime_DELTA_GET_SECONDS(obj);
3016 microseconds = PyDateTime_DELTA_GET_MICROSECONDS(obj);
3578 failing_converter(PyObject *obj, void *arg)
3744 getbuffer_with_null_view(PyObject* self, PyObject *obj)
3746 if (PyObject_GetBuffer(obj, NULL, PyBUF_SIMPLE) < 0)
3838 PyObject *obj;
3841 if (!PyArg_ParseTuple(args, "Oi:pytime_object_to_time_t", &obj, &round))
3845 if (_PyTime_ObjectToTime_t(obj, &sec, round) == -1)
3853 PyObject *obj;
3857 if (!PyArg_ParseTuple(args, "Oi:pytime_object_to_timeval", &obj, &round))
3861 if (_PyTime_ObjectToTimeval(obj, &sec, &usec, round) == -1)
3869 PyObject *obj;
3873 if (!PyArg_ParseTuple(args, "Oi:pytime_object_to_timespec", &obj, &round))
3877 if (_PyTime_ObjectToTimespec(obj, &sec, &nsec, round) == -1)
3939 PyObject *obj;
3942 if (!PyArg_ParseTuple(args, "O:with_tp_del", &obj))
3944 tp = (PyTypeObject *) obj;
3945 if (!PyType_Check(obj) || !PyType_HasFeature(tp, Py_TPFLAGS_HEAPTYPE)) {
3947 "heap type expected, got %R", obj);
3951 Py_INCREF(obj);
3952 return obj;
3956 without_gc(PyObject *Py_UNUSED(self), PyObject *obj)
3958 PyTypeObject *tp = (PyTypeObject*)obj;
3959 if (!PyType_Check(obj) || !PyType_HasFeature(tp, Py_TPFLAGS_HEAPTYPE)) {
3960 return PyErr_Format(PyExc_TypeError, "heap type expected, got %R", obj);
3970 Py_INCREF(obj);
3971 return obj;
3999 PyObject *obj = PyLong_FromLong(0);
4000 Py_XINCREF(_test_incref(obj));
4001 Py_DECREF(obj);
4002 Py_DECREF(obj);
4003 Py_DECREF(obj);
4010 PyObject *obj = PyLong_FromLong(0);
4011 Py_INCREF(_test_incref(obj));
4012 Py_DECREF(obj);
4013 Py_DECREF(obj);
4014 Py_DECREF(obj);
4079 PyObject *obj = PyLong_FromLong(0);
4080 Py_IncRef(obj);
4081 Py_DecRef(obj);
4082 Py_DecRef(obj);
4336 PyMemAllocatorEx obj;
4409 PyMem_GetAllocator(PYMEM_DOMAIN_OBJ, &FmHook.obj);
4417 alloc.ctx = &FmHook.obj;
4428 PyMem_SetAllocator(PYMEM_DOMAIN_OBJ, &FmHook.obj);
4651 PyObject *obj;
4657 &obj, &filename, &version))
4666 PyMarshal_WriteObjectToFile(obj, fp, version);
4737 PyObject *obj = PyMarshal_ReadLastObjectFromFile(fp);
4741 if (obj == NULL) {
4744 return Py_BuildValue("Nl", obj, pos);
4760 PyObject *obj = PyMarshal_ReadObjectFromFile(fp);
4764 if (obj == NULL) {
4767 return Py_BuildValue("Nl", obj, pos);
4814 PyObject *obj;
4816 if (!PyArg_ParseTuple(args, "Oi", &obj, &round)) {
4823 if (_PyTime_FromSecondsObject(&ts, obj, round) == -1) {
4832 PyObject *obj;
4833 if (!PyArg_ParseTuple(args, "O", &obj)) {
4837 if (_PyTime_FromNanosecondsObject(&ts, obj) < 0) {
4847 PyObject *obj;
4849 if (!PyArg_ParseTuple(args, "Oi", &obj, &round)) {
4856 if (_PyTime_FromNanosecondsObject(&t, obj) < 0) {
4874 PyObject *obj;
4876 if (!PyArg_ParseTuple(args, "Oi", &obj, &round)) {
4883 if (_PyTime_FromNanosecondsObject(&t, obj) < 0) {
4900 PyObject *obj;
4901 if (!PyArg_ParseTuple(args, "O", &obj)) {
4905 if (_PyTime_FromNanosecondsObject(&t, obj) < 0) {
4918 PyObject *obj;
4919 if (!PyArg_ParseTuple(args, "O", &obj)) {
4923 if (_PyTime_FromNanosecondsObject(&t, obj) < 0) {
4935 PyObject *obj;
4937 if (!PyArg_ParseTuple(args, "Oi", &obj, &round)) {
4941 if (_PyTime_FromNanosecondsObject(&t, obj) < 0) {
4955 PyObject *obj;
4957 if (!PyArg_ParseTuple(args, "Oi", &obj, &round)) {
4961 if (_PyTime_FromNanosecondsObject(&t, obj) < 0) {
5374 get_mapping_keys(PyObject* self, PyObject *obj)
5376 return PyMapping_Keys(obj);
5380 get_mapping_values(PyObject* self, PyObject *obj)
5382 return PyMapping_Values(obj);
5386 get_mapping_items(PyObject* self, PyObject *obj)
5388 return PyMapping_Items(obj);
5428 PyObject *sequence, *obj;
5430 if (!PyArg_ParseTuple(args, "OnnO", &sequence, &i1, &i2, &obj)) {
5434 int res = PySequence_SetSlice(sequence, i1, i2, obj);
5519 /* def bad_get(self, obj, cls):
5526 PyObject *self, *obj, *cls;
5527 if (!_PyArg_UnpackStack(args, nargs, "bad_get", 3, 3, &self, &obj, &cls)) {
5545 PyObject *obj = PyUnicode_FromString("negative_refcount");
5546 if (obj == NULL) {
5549 assert(Py_REFCNT(obj) == 1);
5551 Py_SET_REFCNT(obj, 0);
5553 Py_DECREF(obj);
5563 PyObject *exc, *err_msg, *obj;
5564 if (!PyArg_ParseTuple(args, "OOO", &exc, &err_msg, &obj)) {
5580 _PyErr_WriteUnraisableMsg(err_msg_utf8, obj);
5621 _null_to_none(PyObject* obj)
5623 if (obj == NULL) {
5626 Py_INCREF(obj);
5627 return obj;
5643 meth_o(PyObject* self, PyObject* obj)
5645 return Py_BuildValue("NO", _null_to_none(self), obj);
5695 PyObject *obj;
5698 &obj, &base)) {
5701 return PyNumber_ToBase(obj, base);
5708 PyObject *obj = PyList_New(0);
5709 if (obj == NULL) {
5715 assert(Py_TYPE(obj) == &PyList_Type);
5716 assert(Py_SIZE(obj) == 0);
5719 Py_SET_TYPE(obj, &PyList_Type);
5720 Py_SET_SIZE(obj, 0);
5722 Py_DECREF(obj);
5729 PyObject *obj = PyList_New(0); \
5730 if (obj == NULL) { \
5733 assert(Py_REFCNT(obj) == 1); \
5736 PyObject *ref = Py_NewRef(obj); \
5737 assert(ref == obj); \
5738 assert(Py_REFCNT(obj) == 2); \
5742 PyObject *xref = Py_XNewRef(obj); \
5743 assert(xref == obj); \
5744 assert(Py_REFCNT(obj) == 2); \
5749 Py_DECREF(obj); \
5778 PyObject *obj = PyList_New(0); \
5779 if (obj == NULL) { \
5784 assert(Py_Is(obj, obj)); \
5785 assert(!Py_Is(obj, o_none)); \
5789 assert(!Py_Is(obj, o_none)); \
5794 assert(!Py_Is(obj, o_true)); \
5799 assert(!Py_Is(obj, o_false)); \
5801 Py_DECREF(obj); \
6304 record_func(PyObject *obj, PyFrameObject *f, int what, PyObject *arg)
6306 assert(PyList_Check(obj));
6325 if (PyList_Append(obj, tuple)) {
6349 error_func(PyObject *obj, PyFrameObject *f, int what, PyObject *arg)
6351 assert(PyList_Check(obj));
6354 if (PyList_GET_SIZE(obj)) {
6357 if (PyList_Append(obj, Py_None)) {
7315 func_descr_get(PyObject *func, PyObject *obj, PyObject *type)
7317 if (obj == Py_None || obj == NULL) {
7321 return PyMethod_New(func, obj);
7325 nop_descr_get(PyObject *func, PyObject *obj, PyObject *type)
7590 assert(view->obj == (void*) self);