Home
last modified time | relevance | path

Searched refs:PyBytes_FromStringAndSize (Results 1 – 25 of 110) sorted by relevance

12345

/external/python/cpython3/Lib/ctypes/test/
Dtest_python_api.py21 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/
Dbase.i58 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/
Daudioop.c927 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.c123 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.c146 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.c141 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.c500 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()
Dfcntlmodule.c87 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()
Dzlibmodule.c98 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.c212 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()
Dbinascii.c277 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()
Dmmapmodule.c238 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.cc249 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/
Dstrings.i76 $result = PyBytes_FromStringAndSize($1.data(), $1.size());
95 PyObject* py_str = PyBytes_FromStringAndSize(op.data(), op.size());
/external/python/cpython2/Modules/_io/
Dbytesio.c195 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()
Dbufferedio.c870 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/
Dbytesobject.c101 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/
Dbytesobject.c101 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/
Dbytesio.c94 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()
Dbufferedio.c937 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/
Dstringdefs.h23 #define STRINGLIB_NEW PyBytes_FromStringAndSize
/external/python/cpython2/Include/
Dbytesobject.h11 #define PyBytes_FromStringAndSize PyString_FromStringAndSize macro
/external/python/cpython3/Modules/_sha3/
Dsha3module.c313 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/
Dpystrhex.c39 retval = PyBytes_FromStringAndSize((const char *)retbuf, arglen*2); in _Py_strhex_impl()
/external/python/cpython2/Modules/
D_testcapimodule.c1326 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 …]

12345