Lines Matching defs:obj
145 /* do the equivalent of obj.name */
147 getattr(PyObject *obj, SubString *name)
153 newobj = PyObject_GetAttr(obj, str);
158 /* do the equivalent of obj[idx], where obj is a sequence */
160 getitem_sequence(PyObject *obj, Py_ssize_t idx)
162 return PySequence_GetItem(obj, idx);
165 /* do the equivalent of obj[idx], where obj is not a sequence */
167 getitem_idx(PyObject *obj, Py_ssize_t idx)
173 newobj = PyObject_GetItem(obj, idx_obj);
178 /* do the equivalent of obj[name] */
180 getitem_str(PyObject *obj, SubString *name)
186 newobj = PyObject_GetItem(obj, str);
399 PyObject *obj = NULL;
426 obj = PyObject_GetItem(kwargs, key);
428 if (obj == NULL) {
444 obj = PySequence_GetItem(args, index);
445 if (obj == NULL) {
461 tmp = getattr(obj, &name);
465 tmp = getitem_str(obj, &name);
467 if (PySequence_Check(obj))
468 tmp = getitem_sequence(obj, index);
471 tmp = getitem_idx(obj, index);
475 /* assign to obj */
476 Py_DECREF(obj);
477 obj = tmp;
481 return obj;
483 Py_XDECREF(obj);
763 /* do the !r or !s conversion on obj */
765 do_conversion(PyObject *obj, Py_UCS4 conversion)
771 return PyObject_Repr(obj);
773 return PyObject_Str(obj);
775 return PyObject_ASCII(obj);
963 do_string_format_map(PyObject *self, PyObject *obj)
965 return do_string_format(self, NULL, obj);
1177 PyObject* obj = NULL;
1185 obj = PyLong_FromSsize_t(idx);
1187 obj = SubString_new_object(&name);
1188 if (obj == NULL)
1192 result = PyTuple_Pack(2, is_attr_obj, obj);
1196 Py_XDECREF(obj);