/external/python/cpython3/Lib/ctypes/test/ |
D | test_frombuffer.py | 15 x = (c_int * 16).from_buffer(a) 17 y = X.from_buffer(a) 32 x = (c_int * 16).from_buffer(a) 42 (c_char * 16).from_buffer(b"a" * 16) 44 (c_char * 16).from_buffer(memoryview(b"a" * 16)) 46 (c_char * 16).from_buffer(memoryview(bytearray(b"a" * 16))[::-1]) 49 (c_char * 16).from_buffer("a" * 16) 60 (c_char * 16).from_buffer(array) 65 (c_char * 16).from_buffer(array) 69 x = (c_int * 15).from_buffer(a, sizeof(c_int)) [all …]
|
D | test_bitfields.py | 273 x = Little.from_buffer(b) 287 x = Big.from_buffer(b)
|
/external/python/cpython2/Lib/ctypes/test/ |
D | test_frombuffer.py | 15 x = (c_int * 16).from_buffer(a) 17 y = X.from_buffer(a) 29 c_int.from_buffer, a, -1) 36 (c_char * 16).from_buffer, "a" * 16) 40 x = (c_int * 15).from_buffer(a, sizeof(c_int)) 43 self.assertRaises(ValueError, lambda: (c_int * 16).from_buffer(a, sizeof(c_int))) 44 self.assertRaises(ValueError, lambda: (c_int * 1).from_buffer(a, 16 * sizeof(c_int))) 62 c_int.from_buffer, a, -1) 83 self.assertRaises(TypeError, Array.from_buffer, bytearray(10)) 84 self.assertRaises(TypeError, Structure.from_buffer, bytearray(10)) [all …]
|
D | test_bitfields.py | 270 x = Little.from_buffer(b) 284 x = Big.from_buffer(b)
|
/external/tensorflow/tensorflow/lite/delegates/gpu/gl/ |
D | gl_buffer_test.cc | 36 std::vector<float> from_buffer; in TEST() local 37 ASSERT_TRUE(AppendFromBuffer(buffer, &from_buffer).ok()); in TEST() 38 EXPECT_EQ(test, from_buffer); in TEST() 48 std::vector<float> from_buffer; in TEST() local 49 ASSERT_TRUE(AppendFromBuffer(buffer, &from_buffer).ok()); in TEST() 50 EXPECT_EQ(test, from_buffer); in TEST() 72 std::vector<float> from_buffer; in TEST() local 73 ASSERT_TRUE(AppendFromBuffer(buffer, &from_buffer).ok()); in TEST() 74 EXPECT_THAT(from_buffer, testing::ElementsAre(0, 1, 2, 3, 4, 0)); in TEST() 118 std::vector<float> from_buffer; in TEST() local [all …]
|
/external/python/cryptography/src/cryptography/hazmat/backends/openssl/ |
D | ciphers.py | 61 iv_nonce = self._backend._ffi.from_buffer( 65 iv_nonce = self._backend._ffi.from_buffer(mode.tweak) 67 iv_nonce = self._backend._ffi.from_buffer(mode.nonce) 69 iv_nonce = self._backend._ffi.from_buffer(cipher.nonce) 112 self._backend._ffi.from_buffer(cipher.key), 135 "unsigned char *", self._backend._ffi.from_buffer(buf) 140 self._backend._ffi.from_buffer(data), len(data) 225 self._backend._ffi.from_buffer(data), len(data)
|
D | hmac.py | 35 key_ptr = self._backend._ffi.from_buffer(key) 59 data_ptr = self._backend._ffi.from_buffer(data)
|
D | aead.py | 57 nonce_ptr = backend._ffi.from_buffer(nonce) 58 key_ptr = backend._ffi.from_buffer(key)
|
D | cmac.py | 39 key_ptr = self._backend._ffi.from_buffer(self._key)
|
D | hashes.py | 50 data_ptr = self._backend._ffi.from_buffer(data)
|
/external/python/cffi/testing/cffi1/ |
D | test_ffi_obj.py | 242 c = ffi.from_buffer(a) 247 py.test.raises(TypeError, ffi.from_buffer, a, True) 248 assert c == ffi.from_buffer("char[]", a, True) 249 assert c == ffi.from_buffer(a, require_writable=True) 251 c = ffi.from_buffer("unsigned short[]", a) 255 c = ffi.from_buffer("unsigned short[2][2]", a) 260 p = ffi.from_buffer(b"abcd") 263 assert p == ffi.from_buffer(b"abcd", require_writable=False) 264 py.test.raises((TypeError, BufferError), ffi.from_buffer, 266 py.test.raises((TypeError, BufferError), ffi.from_buffer, b"abcd",
|
/external/python/cffi/testing/cffi0/ |
D | test_ffi_backend.py | 325 c = ffi.from_buffer(a) 330 assert c == ffi.from_buffer("char[]", a, True) 331 assert c == ffi.from_buffer(a, require_writable=True) 333 c = ffi.from_buffer("unsigned short[]", a) 337 p = ffi.from_buffer(b"abcd") 340 assert p == ffi.from_buffer(b"abcd", require_writable=False) 341 py.test.raises((TypeError, BufferError), ffi.from_buffer, 343 py.test.raises((TypeError, BufferError), ffi.from_buffer, b"abcd",
|
/external/python/pyopenssl/src/OpenSSL/ |
D | _util.py | 158 from_buffer = ffi.from_buffer variable
|
/external/python/pybind11/tests/ |
D | test_pytypes.cpp | 377 return py::memoryview::from_buffer( in TEST_SUBMODULE() 380 return py::memoryview::from_buffer( in TEST_SUBMODULE() 387 return py::memoryview::from_buffer( in TEST_SUBMODULE() 393 return py::memoryview::from_buffer(buf, 1, "B", { }, { }); in TEST_SUBMODULE() 398 return py::memoryview::from_buffer(buf, 1, "B", { 3 }, { }); in TEST_SUBMODULE() 402 return py::memoryview::from_buffer( in TEST_SUBMODULE()
|
D | test_buffers.py | 157 cbytes = (ctypes.c_char * len(pyarray)).from_buffer(pyarray)
|
/external/bcc/examples/networking/dns_matching/ |
D | dns_matching.py | 33 key.p = (c_ubyte * key_len).from_buffer(name_buffer) 35 leaf.p = (c_ubyte * 4).from_buffer(bytearray(4))
|
/external/python/cffi/c/ |
D | test_c.py | 3629 c = from_buffer(BCharA, a) 3641 p1 = from_buffer(BCharA, b"foo") 3642 assert p1 == from_buffer(BCharA, b"foo") 3644 assert p1 == from_buffer(BCharA, b"foo") 3645 py.test.raises(TypeError, from_buffer, BCharA, u+"foo") 3652 contents = from_buffer(BCharA, buffer(b"foo")) 3657 contents = from_buffer(BCharA, buffer(u+"foo")) 3666 contents = from_buffer(BCharA, memoryview(b"foo")) 3677 p = from_buffer(BCharA, a) 3697 c = from_buffer(BCharA, bufobj) [all …]
|
/external/libiio/src/bindings/python/ |
D | iio.py | 451 c_array = mytype.from_buffer(array) 475 c_array = mytype.from_buffer(array) 560 c_array = mytype.from_buffer(array) 581 c_array = mytype.from_buffer(array)
|
/external/python/pybind11/include/pybind11/ |
D | pytypes.h | 1450 static memoryview from_buffer( 1455 static memoryview from_buffer( in from_buffer() function 1459 return memoryview::from_buffer( in from_buffer() 1464 static memoryview from_buffer( 1467 return memoryview::from_buffer( 1473 static memoryview from_buffer( in from_buffer() function 1476 return memoryview::from_buffer( in from_buffer() 1510 inline memoryview memoryview::from_buffer( in from_buffer() function
|
/external/python/cffi/doc/source/ |
D | ref.rst | 145 ffi.buffer(), ffi.from_buffer() 200 **ffi.from_buffer([cdecl,] python_buffer, require_writable=False)**: 203 buffer interface. Note that ``ffi.from_buffer()`` turns a generic 207 ``ffi.from_buffer()`` is meant to be used on objects 218 ``ffi.from_buffer()`` is alive. 222 can directly pass ``ffi.from_buffer(python_buffer)`` as argument to 241 ffi.from_buffer(x); p2 = ffi.cast("int *", p1)`` is that the older code 244 ``ffi.from_buffer("int[]", x)`` gives better array bound checking.) 280 In versions before 1.10, ``ffi.from_buffer()`` had restrictions on the 618 ``ffi.new()``, ``ffi.gc()``, ``ffi.from_buffer()`` or [all …]
|
D | whatsnew.rst | 33 * ``ffi.from_buffer()`` takes a new optional *first* argument that gives 37 * ``ffi.new()``, ``ffi.gc()`` or ``ffi.from_buffer()`` cdata objects 239 * Implemented the remaining cases for ``ffi.from_buffer``. Now all 358 * Removed the restriction that ``ffi.from_buffer()`` cannot be used on 380 * bytearrays: ``ffi.from_buffer(bytearray-object)`` is now supported. 384 ``lib.foo(ffi.from_buffer(x))``. Additionally, this is now supported:
|
/external/python/cpython3/Lib/ctypes/ |
D | __init__.py | 241 return "%s(%s)" % (self.__class__.__name__, c_void_p.from_buffer(self).value) 257 return "%s(%s)" % (self.__class__.__name__, c_void_p.from_buffer(self).value)
|
/external/python/cpython3/Lib/multiprocessing/ |
D | sharedctypes.py | 140 obj = type_.from_buffer(buf)
|
/external/python/cpython3/Misc/NEWS.d/ |
D | 3.6.0b4.rst | 147 In ctypes, prevent a crash calling the from_buffer() and from_buffer_copy()
|
/external/python/cffi/cffi/ |
D | api.py | 346 def from_buffer(self, cdecl, python_buffer=_unspecified, member in FFI 361 return self._backend.from_buffer(cdecl, python_buffer,
|