/external/python/cpython3/Lib/ctypes/test/ |
D | test_python_api.py | 21 PyBytes_FromStringAndSize = pythonapi.PyBytes_FromStringAndSize 23 PyBytes_FromStringAndSize.restype = py_object 24 PyBytes_FromStringAndSize.argtypes = c_char_p, c_py_ssize_t 26 self.assertEqual(PyBytes_FromStringAndSize(b"abcdefghi", 3), b"abc")
|
/external/tensorflow/tensorflow/python/platform/ |
D | base.i | 58 return PyBytes_FromStringAndSize(c.data(), c.size()); in _PyObjFrom() 63 return PyBytes_FromStringAndSize(c.data(), c.size()); in _PyObjFrom() 67 return PyBytes_FromStringAndSize(s.data(), s.size()); in _SwigBytes_FromString() 114 $result = PyBytes_FromStringAndSize($1.data(), $1.size()); 118 $result = PyBytes_FromStringAndSize($1->data(), $1->size()); 126 PyObject *str = PyBytes_FromStringAndSize($1->data(), $1->length()); 134 $result = PyBytes_FromStringAndSize($1.data(), $1.size());
|
/external/python/cpython3/Modules/ |
D | audioop.c | 927 rv = PyBytes_FromStringAndSize(NULL, fragment->len); in audioop_mul_impl() 974 rv = PyBytes_FromStringAndSize(NULL, len/2); in audioop_tomono_impl() 1023 rv = PyBytes_FromStringAndSize(NULL, fragment->len*2); in audioop_tostereo_impl() 1069 rv = PyBytes_FromStringAndSize(NULL, fragment1->len); in audioop_add_impl() 1120 rv = PyBytes_FromStringAndSize(NULL, fragment->len); in audioop_bias_impl() 1178 rv = PyBytes_FromStringAndSize(NULL, fragment->len); in audioop_reverse_impl() 1211 rv = PyBytes_FromStringAndSize(NULL, fragment->len); in audioop_byteswap_impl() 1254 rv = PyBytes_FromStringAndSize(NULL, (fragment->len/width)*newwidth); in audioop_lin2lin_impl() 1394 str = PyBytes_FromStringAndSize(NULL, 0); in audioop_ratecv_impl() 1408 str = PyBytes_FromStringAndSize(NULL, in audioop_ratecv_impl() [all …]
|
D | _dbmmodule.c | 123 return PyBytes_FromStringAndSize(drec.dptr, drec.dsize); in dbm_subscript() 213 item = PyBytes_FromStringAndSize(key.dptr, key.dsize); in _dbm_dbm_keys_impl() 296 return PyBytes_FromStringAndSize(val.dptr, val.dsize); in _dbm_dbm_get_impl() 327 return PyBytes_FromStringAndSize(val.dptr, val.dsize); in _dbm_dbm_setdefault_impl() 329 default_value = PyBytes_FromStringAndSize(NULL, 0); in _dbm_dbm_setdefault_impl()
|
D | _bz2module.c | 146 result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE); in compress() 414 result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE); in decompress_buf() 416 result = PyBytes_FromStringAndSize(NULL, max_length); in decompress_buf() 529 PyBytes_FromStringAndSize(bzs->next_in, d->bzs_avail_in_real)); in decompress() 651 Py_XSETREF(self->unused_data, PyBytes_FromStringAndSize(NULL, 0)); in _bz2_BZ2Decompressor___init___impl()
|
D | _gdbmmodule.c | 141 v = PyBytes_FromStringAndSize(drec.dptr, drec.dsize); in dbm_subscript() 288 item = PyBytes_FromStringAndSize(key.dptr, key.dsize); in _gdbm_gdbm_keys_impl() 372 v = PyBytes_FromStringAndSize(key.dptr, key.dsize); in _gdbm_gdbm_firstkey_impl() 411 v = PyBytes_FromStringAndSize(nextkey.dptr, nextkey.dsize); in _gdbm_gdbm_nextkey_impl()
|
D | _lzmamodule.c | 500 result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE); in compress() 885 return PyBytes_FromStringAndSize(NULL, 0); in decompress_buf() 888 result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE); in decompress_buf() 890 result = PyBytes_FromStringAndSize(NULL, max_length); in decompress_buf() 995 PyBytes_FromStringAndSize((char *)lzs->next_in, lzs->avail_in)); in decompress() 1180 Py_XSETREF(self->unused_data, PyBytes_FromStringAndSize(NULL, 0)); in _lzma_LZMADecompressor___init___impl() 1350 result = PyBytes_FromStringAndSize(NULL, encoded_size); in _lzma__encode_filter_properties_impl()
|
D | fcntlmodule.c | 87 return PyBytes_FromStringAndSize(buf, len); in fcntl_fcntl_impl() 223 return PyBytes_FromStringAndSize(buf, len); in fcntl_ioctl_impl() 248 return PyBytes_FromStringAndSize(buf, len); in fcntl_ioctl_impl()
|
D | zlibmodule.c | 98 self->unused_data = PyBytes_FromStringAndSize("", 0); in newcompobject() 103 self->unconsumed_tail = PyBytes_FromStringAndSize("", 0); in newcompobject() 148 if (!(*buffer = PyBytes_FromStringAndSize(NULL, length))) in arrange_output_buffer_with_maximum() 710 new_data = PyBytes_FromStringAndSize(NULL, new_size); in save_unconsumed_input() 727 PyObject *new_data = PyBytes_FromStringAndSize( in save_unconsumed_input() 872 return PyBytes_FromStringAndSize(NULL, 0); in zlib_Compress_flush_impl()
|
D | _codecsmodule.c | 212 v = PyBytes_FromStringAndSize(NULL, newsize); in _codecs_escape_encode_impl() 685 PyObject *result = PyBytes_FromStringAndSize(data->buf, data->len); in _codecs_readbuffer_encode_impl() 719 return codec_tuple(PyBytes_FromStringAndSize((const char*)u, size), in _codecs_unicode_internal_encode_impl() 727 result = codec_tuple(PyBytes_FromStringAndSize(view.buf, view.len), in _codecs_unicode_internal_encode_impl()
|
D | binascii.c | 277 if ( (rv=PyBytes_FromStringAndSize(NULL, bin_len)) == NULL ) in binascii_a2b_uu_impl() 830 return PyBytes_FromStringAndSize("", 0); in binascii_rledecode_hqx_impl() 1199 retval = PyBytes_FromStringAndSize(NULL, (arglen/2)); in binascii_a2b_hex_impl() 1331 if ((rv = PyBytes_FromStringAndSize((char *)odata, out)) == NULL) { in binascii_a2b_qp_impl() 1542 if ((rv = PyBytes_FromStringAndSize((char *)odata, out)) == NULL) { in binascii_b2a_qp_impl()
|
D | mmapmodule.c | 238 result = PyBytes_FromStringAndSize(start, (eol - start)); in mmap_read_line_method() 258 result = PyBytes_FromStringAndSize(&self->data[self->pos], num_bytes); in mmap_read_method() 758 return PyBytes_FromStringAndSize(self->data + i, 1); in mmap_item() 787 return PyBytes_FromStringAndSize("", 0); in mmap_subscript() 789 return PyBytes_FromStringAndSize(self->data + start, in mmap_subscript() 802 result = PyBytes_FromStringAndSize(result_buf, in mmap_subscript()
|
/external/brotli/python/ |
D | _brotli.cc | 249 ret = PyBytes_FromStringAndSize((char*)(output.size() ? &output[0] : NULL), output.size()); in brotli_Compressor_process() 286 ret = PyBytes_FromStringAndSize((char*)(output.size() ? &output[0] : NULL), output.size()); in brotli_Compressor_flush() 330 ret = PyBytes_FromStringAndSize((char*)(output.empty() ? NULL : &output[0]), output.size()); in brotli_Compressor_finish() 517 ret = PyBytes_FromStringAndSize((char*)(output.empty() ? NULL : &output[0]), output.size()); in brotli_Decompressor_process() 558 ret = PyBytes_FromStringAndSize((char*)(output.empty() ? NULL : &output[0]), output.size()); in brotli_Decompressor_is_finished() 683 ret = PyBytes_FromStringAndSize((char*)(output.size() ? &output[0] : NULL), output.size()); in brotli_decompress()
|
/external/tensorflow/tensorflow/python/lib/core/ |
D | strings.i | 76 $result = PyBytes_FromStringAndSize($1.data(), $1.size()); 95 PyObject* py_str = PyBytes_FromStringAndSize(op.data(), op.size());
|
/external/python/cpython2/Modules/_io/ |
D | bytesio.c | 195 return PyBytes_FromStringAndSize(self->buf, self->string_size); in bytesio_getvalue() 266 return PyBytes_FromStringAndSize(output, size); in bytesio_read() 331 return PyBytes_FromStringAndSize(output, n); in bytesio_readline() 375 line = PyBytes_FromStringAndSize(output, n); in bytesio_readlines() 489 return PyBytes_FromStringAndSize(next, n); in bytesio_iternext()
|
D | bufferedio.c | 870 return PyBytes_FromStringAndSize(NULL, 0); in buffered_read1() 887 res = PyBytes_FromStringAndSize(self->buffer + self->pos, n); in buffered_read1() 910 res = PyBytes_FromStringAndSize(self->buffer, n); in buffered_read1() 948 res = PyBytes_FromStringAndSize(start, s - start + 1); in _buffered_readline() 954 res = PyBytes_FromStringAndSize(start, n); in _buffered_readline() 968 res = PyBytes_FromStringAndSize(start, n); in _buffered_readline() 1002 res = PyBytes_FromStringAndSize(start, s - start); in _buffered_readline() 1009 res = PyBytes_FromStringAndSize(start, n); in _buffered_readline() 1353 data = PyBytes_FromStringAndSize( in _bufferedreader_read_all() 1421 PyObject *res = PyBytes_FromStringAndSize(self->buffer + self->pos, n); in _bufferedreader_read_fast() [all …]
|
/external/python/cpython3/Objects/ |
D | bytesobject.c | 101 PyBytes_FromStringAndSize(const char *str, Py_ssize_t size) in PyBytes_FromStringAndSize() function 454 result = PyBytes_FromStringAndSize(p, len); in formatfloat() 708 key = PyBytes_FromStringAndSize(keystart, in _PyBytes_FormatEx() 1470 result = PyBytes_FromStringAndSize(NULL, va.len + vb.len); in bytes_concat() 1688 return PyBytes_FromStringAndSize("", 0); in bytes_subscript() 1697 return PyBytes_FromStringAndSize( in bytes_subscript() 1703 result = PyBytes_FromStringAndSize(NULL, slicelength); in bytes_subscript() 1975 return PyBytes_FromStringAndSize(s+i, j-i); in do_xstrip() 2005 return PyBytes_FromStringAndSize(s+i, j-i); in do_strip() 2152 result = PyBytes_FromStringAndSize((char *)NULL, inlen); in bytes_translate_impl() [all …]
|
/external/python/cpython2/Objects/ |
D | bytesobject.c | 101 PyBytes_FromStringAndSize(const char *str, Py_ssize_t size) in PyBytes_FromStringAndSize() function 448 result = PyBytes_FromStringAndSize(p, len); in formatfloat() 702 key = PyBytes_FromStringAndSize(keystart, in _PyBytes_FormatEx() 1464 result = PyBytes_FromStringAndSize(NULL, va.len + vb.len); in bytes_concat() 1695 return PyBytes_FromStringAndSize("", 0); in bytes_subscript() 1704 return PyBytes_FromStringAndSize( in bytes_subscript() 1710 result = PyBytes_FromStringAndSize(NULL, slicelength); in bytes_subscript() 1982 return PyBytes_FromStringAndSize(s+i, j-i); in do_xstrip() 2012 return PyBytes_FromStringAndSize(s+i, j-i); in do_strip() 2159 result = PyBytes_FromStringAndSize((char *)NULL, inlen); in bytes_translate_impl() [all …]
|
/external/python/cpython3/Modules/_io/ |
D | bytesio.c | 94 new_buf = PyBytes_FromStringAndSize(NULL, size); in unshare_buffer() 308 return PyBytes_FromStringAndSize(PyBytes_AS_STRING(self->buf), in _io_BytesIO_getvalue_impl() 372 return PyBytes_FromStringAndSize(output, size); in read_bytes() 494 line = PyBytes_FromStringAndSize(output, n); in _io_BytesIO_readlines_impl() 891 self->buf = PyBytes_FromStringAndSize(NULL, 0); in bytesio_new()
|
D | bufferedio.c | 937 return PyBytes_FromStringAndSize(NULL, 0); in _io__Buffered_read1_impl() 949 res = PyBytes_FromStringAndSize(NULL, n); in _io__Buffered_read1_impl() 1098 res = PyBytes_FromStringAndSize(start, s - start + 1); in _buffered_readline() 1104 res = PyBytes_FromStringAndSize(start, n); in _buffered_readline() 1118 res = PyBytes_FromStringAndSize(start, n); in _buffered_readline() 1152 res = PyBytes_FromStringAndSize(start, s - start); in _buffered_readline() 1159 res = PyBytes_FromStringAndSize(start, n); in _buffered_readline() 1528 data = PyBytes_FromStringAndSize( in _bufferedreader_read_all() 1619 PyObject *res = PyBytes_FromStringAndSize(self->buffer + self->pos, n); in _bufferedreader_read_fast() 1641 res = PyBytes_FromStringAndSize(NULL, n); in _bufferedreader_read_generic() [all …]
|
/external/python/cpython3/Objects/stringlib/ |
D | stringdefs.h | 23 #define STRINGLIB_NEW PyBytes_FromStringAndSize
|
/external/python/cpython2/Include/ |
D | bytesobject.h | 11 #define PyBytes_FromStringAndSize PyString_FromStringAndSize macro
|
/external/python/cpython3/Modules/_sha3/ |
D | sha3module.c | 313 return PyBytes_FromStringAndSize((const char *)digest, in _sha3_sha3_224_digest_impl() 473 return PyBytes_FromStringAndSize((const char *)suffix, 1); in SHA3_get_suffix() 626 result = PyBytes_FromStringAndSize((const char *)digest, in _SHAKE_digest()
|
/external/python/cpython3/Python/ |
D | pystrhex.c | 39 retval = PyBytes_FromStringAndSize((const char *)retbuf, arglen*2); in _Py_strhex_impl()
|
/external/python/cpython2/Modules/ |
D | _testcapimodule.c | 1326 bytes = PyBytes_FromStringAndSize(buffer.buf, buffer.len); in getargs_s_star() 1338 return PyBytes_FromStringAndSize(str, size); in getargs_s_hash() 1348 return PyBytes_FromStringAndSize(str, size); in getargs_t_hash() 1371 bytes = PyBytes_FromStringAndSize(buffer.buf, buffer.len); in getargs_z_star() 1388 return PyBytes_FromStringAndSize(str, size); in getargs_z_hash() 1407 return PyBytes_FromStringAndSize(str, size); in getargs_w() 1424 return PyBytes_FromStringAndSize(str, size); in getargs_w_hash() 1443 result = PyBytes_FromStringAndSize(buffer.buf, buffer.len); in getargs_w_star() 1532 result = PyBytes_FromStringAndSize(str, size); in getargs_es_hash() 1556 result = PyBytes_FromStringAndSize(str, size); in getargs_et_hash() [all …]
|