Home
last modified time | relevance | path

Searched refs:PyString_AS_STRING (Results 1 – 25 of 96) sorted by relevance

1234

/aosp_15_r20/external/python/cpython2/Objects/
Dstringobject.c394 if (_PyString_Resize(&string, s - PyString_AS_STRING(string))) in PyString_FromFormatV()
650 r = PyString_AS_STRING(w); in PyString_DecodeEscape()
831 *s = PyString_AS_STRING(obj); in PyString_AsStringAndSize()
960 p = PyString_AS_STRING(v); in PyString_Repr()
965 assert(newsize - (p - PyString_AS_STRING(v)) >= 5); in PyString_Repr()
985 assert(newsize - (p - PyString_AS_STRING(v)) >= 1); in PyString_Repr()
988 if (_PyString_Resize(&v, (p - PyString_AS_STRING(v)))) in PyString_Repr()
1336 PyString_AS_STRING(self) + start, in string_subscript()
1463 const char *s = PyString_AS_STRING(self), *sub; in string_split()
1473 sub = PyString_AS_STRING(subobj); in string_split()
[all …]
Dexceptions.c1182 PyString_AS_STRING(str), in SyntaxError_str()
1183 my_basename(PyString_AS_STRING(self->filename)), in SyntaxError_str()
1187 PyString_AS_STRING(str), in SyntaxError_str()
1188 my_basename(PyString_AS_STRING(self->filename))); in SyntaxError_str()
1191 PyString_AS_STRING(str), in SyntaxError_str()
1658 PyString_AS_STRING(encoding_str), in UnicodeEncodeError_str()
1661 PyString_AS_STRING(reason_str)); in UnicodeEncodeError_str()
1666 PyString_AS_STRING(encoding_str), in UnicodeEncodeError_str()
1669 PyString_AS_STRING(reason_str)); in UnicodeEncodeError_str()
1739 ((int)PyString_AS_STRING(uself->object)[uself->start])&0xff); in UnicodeDecodeError_str()
[all …]
Dclassobject.c265 PyString_AS_STRING(op->cl_name), sname); in class_getattr()
330 if (strlen(PyString_AS_STRING(v)) != (size_t)PyString_GET_SIZE(v)) in set_name()
381 PyString_AS_STRING(op->cl_name), sname); in class_setattr()
423 char *s = PyString_AS_STRING(res); in class_str()
424 memcpy(s, PyString_AS_STRING(mod), m); in class_str()
427 memcpy(s, PyString_AS_STRING(name), n); in class_str()
738 PyString_AS_STRING(inst->in_class->cl_name), sname); in instance_getattr1()
817 PyString_AS_STRING(inst->in_class->cl_name), in instance_setattr1()
818 PyString_AS_STRING(name)); in instance_setattr1()
2434 sfuncname = PyString_AS_STRING(funcname); in instancemethod_repr()
[all …]
Dfileobject.c23 #define BUF(v) PyString_AS_STRING((PyStringObject *)v)
1609 char *s = PyString_AS_STRING(result); in PyFile_GetLine()
1754 buffer = PyString_AS_STRING(big_buffer); in file_readlines()
1761 buffer = PyString_AS_STRING(big_buffer); in file_readlines()
1844 s = PyString_AS_STRING(text); in file_write()
1850 encoding = PyString_AS_STRING(f->f_encoding); in file_write()
1854 errors = PyString_AS_STRING(f->f_errors); in file_write()
1860 s = PyString_AS_STRING(encoded); in file_write()
1991 nwritten = fwrite(PyString_AS_STRING(line), in file_writelines()
2320 memcpy(PyString_AS_STRING(s) + skip, rab->bufptr, len); in readahead_get_line_skip()
[all …]
Dcodeobject.c22 s = (unsigned char *)PyString_AS_STRING(o); in all_name_chars()
249 PyString_AS_STRING(item), in validate_and_copy_tuple()
374 filename = PyString_AS_STRING(co->co_filename); in code_repr()
376 name = PyString_AS_STRING(co->co_name); in code_repr()
722 p = (unsigned char*)PyString_AS_STRING(co->co_lnotab); in _PyCode_CheckLineNumber()
Dunicodeobject.c1017 const char *str = PyString_AS_STRING(*callresult); in PyUnicode_FromFormatV()
1204 s = PyString_AS_STRING(obj); in PyUnicode_FromEncodedObject()
1858 start = out = PyString_AS_STRING(v); in PyUnicode_EncodeUTF7()
2184 p = PyString_AS_STRING(v); in PyUnicode_EncodeUTF8()
2236 nneeded = p - PyString_AS_STRING(v); in PyUnicode_EncodeUTF8()
2479 p = (unsigned char *)PyString_AS_STRING(v); in PyUnicode_EncodeUTF32()
2755 p = (unsigned char *)PyString_AS_STRING(v); in PyUnicode_EncodeUTF16()
3082 p = PyString_AS_STRING(repr); in unicodeescape_string()
3094 ch == (Py_UNICODE) PyString_AS_STRING(repr)[1]) || ch == '\\') { in unicodeescape_string()
3180 *p++ = PyString_AS_STRING(repr)[1]; in unicodeescape_string()
[all …]
Dobject.c1203 return (*tp->tp_getattr)(v, PyString_AS_STRING(name)); in PyObject_GetAttr()
1206 tp->tp_name, PyString_AS_STRING(name)); in PyObject_GetAttr()
1257 err = (*tp->tp_setattr)(v, PyString_AS_STRING(name), value); in PyObject_SetAttr()
1268 PyString_AS_STRING(name)); in PyObject_SetAttr()
1275 PyString_AS_STRING(name)); in PyObject_SetAttr()
1457 tp->tp_name, PyString_AS_STRING(name)); in _PyObject_GenericGetAttrWithDict()
1549 tp->tp_name, PyString_AS_STRING(name)); in _PyObject_GenericSetAttrWithDict()
1555 tp->tp_name, PyString_AS_STRING(name)); in _PyObject_GenericSetAttrWithDict()
Dtypeobject.c266 if (strlen(PyString_AS_STRING(value)) in type_set_name()
282 type->tp_name = PyString_AS_STRING(value); in type_set_name()
723 if (mod != NULL && strcmp(PyString_AS_STRING(mod), "__builtin__")) { in type_repr()
726 PyString_AS_STRING(mod), in type_repr()
727 PyString_AS_STRING(name)); in type_repr()
1445 o ? PyString_AS_STRING(o) : "?"); in check_duplicates()
1491 name ? PyString_AS_STRING(name) : "?"); in set_mro_error()
2005 p = (unsigned char *) PyString_AS_STRING(s); in valid_identifier()
2243 s = PyString_AS_STRING(tmp); in type_new()
2275 s = PyString_AS_STRING(tmp); in type_new()
[all …]
/aosp_15_r20/external/python/cpython2/PC/
D_subprocess.c356 p = PyString_AS_STRING(out); in getenvironment()
370 if (strlen(PyString_AS_STRING(key)) != ksize || in getenvironment()
371 strlen(PyString_AS_STRING(value)) != vsize) in getenvironment()
378 if (ksize == 0 || strchr(PyString_AS_STRING(key) + 1, '=') != NULL) { in getenvironment()
382 totalsize = (p - PyString_AS_STRING(out)) + ksize + 1 + in getenvironment()
385 size_t offset = p - PyString_AS_STRING(out); in getenvironment()
388 p = PyString_AS_STRING(out) + offset; in getenvironment()
390 memcpy(p, PyString_AS_STRING(key), ksize); in getenvironment()
393 memcpy(p, PyString_AS_STRING(value), vsize); in getenvironment()
400 _PyString_Resize(&out, p - PyString_AS_STRING(out)); in getenvironment()
[all …]
/aosp_15_r20/external/python/cpython2/Modules/
Dbinascii.c215 bin_data = (unsigned char *)PyString_AS_STRING(rv); in binascii_a2b_uu()
301 ascii_data = (unsigned char *)PyString_AS_STRING(rv); in binascii_b2a_uu()
326 (unsigned char *)PyString_AS_STRING(rv))); in binascii_b2a_uu()
390 bin_data = (unsigned char *)PyString_AS_STRING(rv); in binascii_a2b_base64()
497 ascii_data = (unsigned char *)PyString_AS_STRING(rv); in binascii_b2a_base64()
524 (unsigned char *)PyString_AS_STRING(rv))); in binascii_b2a_base64()
562 bin_data = (unsigned char *)PyString_AS_STRING(rv); in binascii_a2b_hqx()
601 (unsigned char *)PyString_AS_STRING(rv))) == 0) { in binascii_a2b_hqx()
640 out_data = (unsigned char *)PyString_AS_STRING(rv); in binascii_rlecode_hqx()
669 (unsigned char *)PyString_AS_STRING(rv))); in binascii_rlecode_hqx()
[all …]
D_json.c228 output = PyString_AS_STRING(rval); in ascii_escape_unicode()
253 output = PyString_AS_STRING(rval); in ascii_escape_unicode()
278 input_str = PyString_AS_STRING(pystr); in ascii_escape_str()
324 output = PyString_AS_STRING(rval); in ascii_escape_str()
354 output = PyString_AS_STRING(rval); in ascii_escape_str()
448 char *buf = PyString_AS_STRING(pystr); in scanstring_str()
890 char *str = PyString_AS_STRING(pystr); in _parse_object_str()
897 char *encoding = PyString_AS_STRING(s->encoding); in _parse_object_str()
1144 char *str = PyString_AS_STRING(pystr); in _parse_array_str()
1306 char *str = PyString_AS_STRING(pystr); in _match_number_str()
[all …]
Ddbmmodule.c110 PyString_AS_STRING((PyStringObject *)key)); in dbm_subscript()
142 PyString_AS_STRING((PyStringObject *)v)); in dbm_ass_sub()
308 val.dptr = PyString_AS_STRING(defvalue); in dbm_setdefault()
Dgdbmmodule.c131 PyString_AS_STRING((PyStringObject *)key)); in dbm_subscript()
158 PyString_AS_STRING((PyStringObject *)v)); in dbm_ass_sub()
197 key.dptr = PyString_AS_STRING(arg); in dbm_contains()
Dzlibmodule.c550 Py_MEMCPY(PyString_AS_STRING(new_data), in save_unconsumed_input()
551 PyString_AS_STRING(self->unused_data), old_size); in save_unconsumed_input()
552 Py_MEMCPY(PyString_AS_STRING(new_data) + old_size, in save_unconsumed_input()
879 self->zst.next_in = (Byte *)PyString_AS_STRING(self->unconsumed_tail); in PyZlib_unflush()
910 (Byte *)PyString_AS_STRING(self->unconsumed_tail), in PyZlib_unflush()
DcPickle.c1134 pdata = (unsigned char *)PyString_AS_STRING(repr); in save_long()
1182 PyString_AS_STRING((PyStringObject *)repr), in save_long()
1259 repr_str = PyString_AS_STRING((PyStringObject *)repr); in save_string()
1302 PyString_AS_STRING( in save_string()
1347 p = q = PyString_AS_STRING(repr); in modified_EncodeRawUnicodeEscape()
1430 repr_str = PyString_AS_STRING((PyStringObject *)repr); in save_unicode()
1472 if (self->write_func(self, PyString_AS_STRING(repr), in save_unicode()
2117 module_str = PyString_AS_STRING((PyStringObject *)module); in save_inst()
2118 name_str = PyString_AS_STRING((PyStringObject *)name); in save_inst()
2217 module_str = PyString_AS_STRING((PyStringObject *)module); in save_global()
[all …]
D_elementtree.c756 char *p = PyString_AS_STRING(tag); in checkpath()
1278 PyString_AS_STRING(tag), self); in element_repr()
1903 PyString_AS_STRING(self->data)[size] = PyString_AS_STRING(data)[0];
2148 p = PyString_AS_STRING(tag);
2162 p = PyString_AS_STRING(tag);
2249 sprintf(message, "undefined entity &%.100s;", PyString_AS_STRING(key));
2796 self, PyString_AS_STRING(buffer), (int)PyString_GET_SIZE(buffer), 0
2870 event = PyString_AS_STRING(item);
/aosp_15_r20/external/python/cpython2/Python/
Dgetargs.c845 *p = PyString_AS_STRING(arg)[0]; in convertsimple()
857 PyString_AS_STRING(arg), PyString_GET_SIZE(arg), in convertsimple()
867 PyString_AS_STRING(uarg), PyString_GET_SIZE(uarg), in convertsimple()
887 *p = PyString_AS_STRING(arg); in convertsimple()
896 *p = PyString_AS_STRING(uarg); in convertsimple()
912 *p = PyString_AS_STRING(arg); in convertsimple()
919 *p = PyString_AS_STRING(uarg); in convertsimple()
939 PyString_AS_STRING(arg), PyString_GET_SIZE(arg), in convertsimple()
949 PyString_AS_STRING(uarg), PyString_GET_SIZE(uarg), in convertsimple()
973 *p = PyString_AS_STRING(arg); in convertsimple()
[all …]
Dcompile.c234 buffer = PyString_AS_STRING(ident); in _Py_Mangle()
1240 PyString_AS_STRING(name), in get_ref_type()
1241 PyString_AS_STRING(c->u->u_name), in get_ref_type()
1242 PyString_AS_STRING(PyObject_Repr(c->u->u_ste->ste_id)), in get_ref_type()
1244 PyString_AS_STRING(PyObject_Repr(c->u->u_ste->ste_symbols)), in get_ref_type()
1245 PyString_AS_STRING(PyObject_Repr(c->u->u_varnames)), in get_ref_type()
1246 PyString_AS_STRING(PyObject_Repr(c->u->u_names)) in get_ref_type()
1298 PyString_AS_STRING(PyObject_Repr(name)), in compiler_make_closure()
1299 PyString_AS_STRING(c->u->u_name), in compiler_make_closure()
1301 PyString_AS_STRING(co->co_name), in compiler_make_closure()
[all …]
Dsymtable.c91 PyString_AS_STRING(ste->ste_name), in ste_repr()
383 PyString_AS_STRING(name)); in analyze_name()
435 PyString_AS_STRING(name)); in analyze_name()
504 PyString_AS_STRING(ste->ste_name), trailer); in check_unoptimized()
510 PyString_AS_STRING(ste->ste_name), trailer); in check_unoptimized()
516 PyString_AS_STRING(ste->ste_name), trailer); in check_unoptimized()
1148 char *c_name = PyString_AS_STRING(name); in symtable_visit_stmt()
1412 const char *base = PyString_AS_STRING(name); in symtable_visit_alias()
1423 if (strcmp(PyString_AS_STRING(name), "*")) { in symtable_visit_alias()
Dmarshal.c88 p->ptr = PyString_AS_STRING((PyStringObject *)p->str) + size; in w_more()
90 PyString_AS_STRING((PyStringObject *)p->str) + newsize; in w_more()
365 w_pstring(PyString_AS_STRING(utf8), PyString_GET_SIZE(utf8), p); in w_object()
825 if (r_string(PyString_AS_STRING(v), n, p) != n) { in r_object()
1225 wf.ptr = PyString_AS_STRING((PyStringObject *)wf.str); in PyMarshal_WriteObjectToString()
1234 char *base = PyString_AS_STRING((PyStringObject *)wf.str); in PyMarshal_WriteObjectToString()
Dimport.c512 name = PyString_AS_STRING(key); in PyImport_Cleanup()
536 name = PyString_AS_STRING(key); in PyImport_Cleanup()
670 m = PyModule_New(PyString_AS_STRING(name)); in _PyImport_AddModuleObject()
1493 strcpy(buf, PyString_AS_STRING(v)); in find_module()
2409 strcpy(buf, PyString_AS_STRING(pkgname)); in get_parent()
2426 strcpy(buf, PyString_AS_STRING(modname)); in get_parent()
2435 char *start = PyString_AS_STRING(modname); in get_parent()
2622 if (PyString_AS_STRING(item)[0] == '*') { in ensure_fromlist()
2641 char *subname = PyString_AS_STRING(item); in ensure_fromlist()
2822 PyString_AS_STRING(parentname)); in PyImport_ReloadModule()
/aosp_15_r20/external/tensorflow/tensorflow/python/lib/core/
H A Dpy_util.cc32 return PyString_AS_STRING( in ClassName()
35 return PyString_AS_STRING(CHECK_NOTNULL( in ClassName()
85 strings::StrAppend(out, PyString_AS_STRING(v), "\n"); in TryAppendTraceback()
109 strings::StrAppend(&err, ": ", PyString_AS_STRING(str), "\n"); in PyExceptionFetch()
/aosp_15_r20/external/python/cpython2/Mac/Modules/
D_scproxy.c33 PyString_AS_STRING(result), in cfstring_to_pystring()
41 strlen(PyString_AS_STRING(result))); in cfstring_to_pystring()
147 PyString_AS_STRING(h), in set_proxy()
151 PyString_AS_STRING(h)); in set_proxy()
/aosp_15_r20/external/python/cpython2/Modules/cjkcodecs/
Dmultibytecodec.c97 cb = PyCodec_LookupError(PyString_AS_STRING(errors)); in call_error_callback()
146 cb = internal_error_callback(PyString_AS_STRING(value)); in codecctx_errors_set()
169 PyString_AS_STRING(buf->outobj)); in expand_encodebuffer()
181 buf->outbuf = (unsigned char *)PyString_AS_STRING(buf->outobj) +orgpos; in expand_encodebuffer()
182 buf->outbuf_end = (unsigned char *)PyString_AS_STRING(buf->outobj) in expand_encodebuffer()
333 memcpy(buf->outbuf, PyString_AS_STRING(retstr), retstrsize); in multibytecodec_encerror()
491 buf.outbuf = (unsigned char *)PyString_AS_STRING(buf.outobj); in multibytecodec_encode()
526 PyString_AS_STRING(buf.outobj)); in multibytecodec_encode()
1281 ctrdata = PyString_AS_STRING(ctr); in mbstreamreader_iread()
1284 PyString_AS_STRING(cres), in mbstreamreader_iread()
[all …]
/aosp_15_r20/external/chromium-trace/catapult/common/py_vulcanize/third_party/rjsmin/
H A Drjsmin.c441 #define PyString_AS_STRING PyUnicode_AS_UNICODE in rjsmin_jsmin() macro
452 length = rjsmin((rchar *)PyString_AS_STRING(script), in rjsmin_jsmin()
453 (rchar *)PyString_AS_STRING(result), in rjsmin_jsmin()
467 script = PyUnicode_DecodeUTF8(PyString_AS_STRING(result), in rjsmin_jsmin()

1234