Home
last modified time | relevance | path

Searched refs:calcsize (Results 1 – 25 of 41) sorted by relevance

12

/third_party/python/Lib/test/
Dtest_struct.py38 self.assertRaises(struct.error, struct.calcsize, 'Z')
40 sz = struct.calcsize('i')
41 self.assertEqual(sz * 3, struct.calcsize('iii'))
45 sz = struct.calcsize(fmt)
46 sz3 = struct.calcsize(fmt3)
130 self.assertEqual(struct.calcsize(xfmt), len(res))
147 size = struct.calcsize(format)
154 signed_size = struct.calcsize(byteorder + format_pair[0])
155 unsigned_size = struct.calcsize(byteorder + format_pair[1])
159 self.assertEqual(struct.calcsize('b'), 1)
[all …]
Dtest_sys.py1136 self.P = struct.calcsize('P')
1190 calcsize = struct.calcsize
1226 check_code_size(get_cell2.__code__, size('6i13P') + calcsize('n'))
1246 check({"a": 1}, size('nQ2P') + calcsize('2nP2n') + 8 + (8*2//3)*calcsize('n2P'))
1248 check(longdict, size('nQ2P') + calcsize('2nP2n') + 16 + (16*2//3)*calcsize('n2P'))
1381 check(set(sample), s + newsize*calcsize('nP'))
1382 check(frozenset(sample), s + newsize*calcsize('nP'))
1407 check(newstyleclass, s + calcsize("2nP2n0P") + 8 + 5*calcsize("n2P"))
1413 check(newstyleclass, s + calcsize("2nP2n0P") + 16 + 10*calcsize("n2P"))
1455 expected = sys.getsizeof(base) + struct.calcsize(extra)
Dtest_pickle.py281 MT_size = struct.calcsize('3nP0n')
282 ME_size = struct.calcsize('Pn0P')
297 P = struct.calcsize('P') # Size of memo table entry.
298 n = struct.calcsize('n') # Size of mark table entry.
Dtest_xml_etree_c.py217 self.extra = struct.calcsize('PnnP4P')
235 struct.calcsize('8P'))
Dtest_ordered_dict.py750 calcsize = struct.calcsize
755 keysize = calcsize('2nP2n')
757 entrysize = calcsize('n2P')
758 p = calcsize('P')
759 nodesize = calcsize('Pn2P')
Dtest_buffer.py1063 itemsize = struct.calcsize(fmt)
1304 itemsize = struct.calcsize(fmt)
1315 itemsize = struct.calcsize(fmt)
1327 itemsize = struct.calcsize(fmt)
1357 itemsize = struct.calcsize(fmt)
1729 itemsize = struct.calcsize(fmt)
1761 itemsize = struct.calcsize(fmt)
1880 itemsize = struct.calcsize(fmt)
1921 itemsize = struct.calcsize(fmt)
1949 itemsize = struct.calcsize(fmt)
[all …]
Dtest_fcntl.py29 if struct.calcsize('l') == 8:
Dstring_tests.py394 if sys.maxsize < (1 << 32) and struct.calcsize('P') == 4:
715 @unittest.skipIf(sys.maxsize > (1 << 32) or struct.calcsize('P') != 4,
/third_party/python/Lib/ctypes/test/
Dtest_structures.py6 from struct import calcsize
76 (calcsize("c%c0%c" % (code, code)), code))
84 (calcsize("%c" % (code)), code))
89 self.assertEqual(alignment(X), calcsize("s"))
90 self.assertEqual(sizeof(X), calcsize("3s"))
96 self.assertEqual(sizeof(Y), calcsize("3si"))
102 self.assertEqual(sizeof(SI), calcsize("3s0i 3si 0i"))
109 self.assertEqual(sizeof(IS), calcsize("3si 3s 0i"))
115 self.assertEqual(sizeof(XX), calcsize("3s 3s 0s"))
188 longlong_size = struct.calcsize("q")
[all …]
Dtest_numbers.py14 size = struct.calcsize(fmt)
143 size = struct.calcsize(t._type_)
154 align = struct.calcsize("c%c" % code) - struct.calcsize(code)
Dtest_prototypes.py36 num_bits = struct.calcsize("P") * 8 # num bits in native machine address
/third_party/protobuf/python/google/protobuf/internal/
Dwire_format.py74 if struct.calcsize(FORMAT_UINT32_LITTLE_ENDIAN) != 4:
76 if struct.calcsize(FORMAT_UINT64_LITTLE_ENDIAN) != 8:
Dencoder.py514 value_size = struct.calcsize(format)
556 value_size = struct.calcsize(format)
/third_party/python/Modules/clinic/
D_struct.c.h190 {"calcsize", (PyCFunction)calcsize, METH_O, calcsize__doc__},
196 calcsize(PyObject *module, PyObject *arg) in calcsize() function
/third_party/python/Lib/ctypes/
D__init__.py15 from struct import calcsize as _calcsize
145 from struct import calcsize
149 actual, required = sizeof(typ), calcsize(typecode)
Dutil.py272 if struct.calcsize('l') == 4:
/third_party/python/Doc/library/
Dstruct.rst70 size required by the format, as reflected by :func:`calcsize`.
78 least the size required by the format, as reflected by :func:`calcsize`.
87 required by the format, as reflected by :func:`calcsize`.
94 .. function:: calcsize(format)
354 >>> calcsize('hhl')
375 >>> calcsize('ci')
377 >>> calcsize('ic')
/third_party/protobuf/kokoro/release/python/windows/
Dbuild_single_artifact.bat36 python -c "import struct; print(struct.calcsize('P') * 8)"
/third_party/mesa3d/src/gallium/tools/trace/
Ddump_state.py47 size = struct.calcsize(fmt)
373 for offset in range(0, len(data), struct.calcsize(format)):
466 assert struct.calcsize(format) == index_size
/third_party/python/Lib/
Dzipfile.py84 sizeEndCentDir = struct.calcsize(structEndArchive)
103 sizeCentralDir = struct.calcsize(structCentralDir)
130 sizeFileHeader = struct.calcsize(structFileHeader)
148 sizeEndCentDir64Locator = struct.calcsize(structEndArchive64Locator)
154 sizeEndCentDir64 = struct.calcsize(structEndArchive64)
430 1, struct.calcsize(fmt)-4, file_size, compress_size)
/third_party/python/Objects/
Dabstract.c528 PyObject *calcsize = NULL; in PyBuffer_SizeFromFormat() local
538 calcsize = PyObject_GetAttrString(structmodule, "calcsize"); in PyBuffer_SizeFromFormat()
539 if (calcsize == NULL) { in PyBuffer_SizeFromFormat()
548 res = PyObject_CallFunctionObjArgs(calcsize, fmt, NULL); in PyBuffer_SizeFromFormat()
560 Py_XDECREF(calcsize); in PyBuffer_SizeFromFormat()
/third_party/python/Lib/multiprocessing/
Dsynchronize.py365 wrapper = BufferWrapper(struct.calcsize('i') * 2)
Dshared_memory.py320 requested_size = struct.calcsize(
/third_party/python/Modules/
D_testbuffer.c13 static PyObject *calcsize = NULL; variable
791 tmp = PyObject_CallFunctionObjArgs(calcsize, format, NULL); in get_itemsize()
2851 calcsize = PyObject_GetAttrString(structmodule, "calcsize"); in PyInit__testbuffer()
2852 if (Struct == NULL || calcsize == NULL) in PyInit__testbuffer()
/third_party/python/Lib/test/support/
D__init__.py665 return struct.calcsize(_header + fmt + _align)
669 return struct.calcsize(_vheader + fmt + _align)

12