Lines Matching defs:obj
391 static int convert_uc(PyObject *obj, void *addr);
903 ensure_unicode(PyObject *obj)
905 if (!PyUnicode_Check(obj)) {
908 Py_TYPE(obj)->tp_name);
911 return PyUnicode_READY(obj);
1321 printf("obj %p\n", (void*)unicode);
1373 PyObject *obj;
1425 obj = (PyObject *) PyObject_Malloc(struct_size + (size + 1) * char_size);
1426 if (obj == NULL) {
1429 _PyObject_Init(obj, &PyUnicode_Type);
1431 unicode = (PyCompactUnicodeObject *)obj;
1433 data = ((PyASCIIObject*)obj) + 1;
1474 return obj;
2305 PyObject *obj;
2307 obj = ids->array[index];
2308 if (obj) {
2310 return obj;
2314 obj = PyUnicode_DecodeUTF8Stateful(id->string, strlen(id->string),
2316 if (!obj) {
2319 PyUnicode_InternInPlace(&obj);
2336 ids->array[index] = obj;
2339 return obj;
2990 PyObject *obj = va_arg(*vargs, PyObject *);
2991 assert(obj && _PyUnicode_CHECK(obj));
2993 if (unicode_fromformat_write_str(writer, obj, width, precision) == -1)
3000 PyObject *obj = va_arg(*vargs, PyObject *);
3002 if (obj) {
3003 assert(_PyUnicode_CHECK(obj));
3004 if (unicode_fromformat_write_str(writer, obj, width, precision) == -1)
3017 PyObject *obj = va_arg(*vargs, PyObject *);
3019 assert(obj);
3020 str = PyObject_Str(obj);
3033 PyObject *obj = va_arg(*vargs, PyObject *);
3035 assert(obj);
3036 repr = PyObject_Repr(obj);
3049 PyObject *obj = va_arg(*vargs, PyObject *);
3051 assert(obj);
3052 ascii = PyObject_ASCII(obj);
3342 _PyUnicode_WideCharString_Converter(PyObject *obj, void *ptr)
3345 if (obj == NULL) {
3352 if (PyUnicode_Check(obj)) {
3354 *p = (wchar_t *)_PyUnicode_AsUnicode(obj);
3360 *p = PyUnicode_AsWideCharString(obj, NULL);
3369 Py_TYPE(obj)->tp_name);
3374 _PyUnicode_WideCharString_Opt_Converter(PyObject *obj, void *ptr)
3377 if (obj == NULL) {
3384 if (obj == Py_None) {
3388 if (PyUnicode_Check(obj)) {
3390 *p = (wchar_t *)_PyUnicode_AsUnicode(obj);
3396 *p = PyUnicode_AsWideCharString(obj, NULL);
3405 Py_TYPE(obj)->tp_name);
3422 PyUnicode_FromObject(PyObject *obj)
3426 if (PyUnicode_CheckExact(obj)) {
3427 if (PyUnicode_READY(obj) == -1)
3429 Py_INCREF(obj);
3430 return obj;
3432 if (PyUnicode_Check(obj)) {
3435 return _PyUnicode_Copy(obj);
3439 Py_TYPE(obj)->tp_name);
3444 PyUnicode_FromEncodedObject(PyObject *obj,
3451 if (obj == NULL) {
3457 if (PyBytes_Check(obj)) {
3458 if (PyBytes_GET_SIZE(obj) == 0) {
3465 PyBytes_AS_STRING(obj), PyBytes_GET_SIZE(obj),
3469 if (PyUnicode_Check(obj)) {
3476 if (PyObject_GetBuffer(obj, &buffer, PyBUF_SIMPLE) < 0) {
3479 Py_TYPE(obj)->tp_name);
7397 code_page_name(UINT code_page, PyObject **obj)
7399 *obj = NULL;
7407 *obj = PyBytes_FromFormat("cp%u", code_page);
7408 if (*obj == NULL)
7410 return PyBytes_AS_STRING(*obj);
10944 convert_uc(PyObject *obj, void *addr)
10948 if (!PyUnicode_Check(obj)) {
10951 "not %.100s", Py_TYPE(obj)->tp_name);
10954 if (PyUnicode_READY(obj) < 0)
10956 if (PyUnicode_GET_LENGTH(obj) != 1) {
10961 *fillcharloc = PyUnicode_READ_CHAR(obj, 0);