Home
last modified time | relevance | path

Searched refs:PyMem_New (Results 1 – 22 of 22) sorted by relevance

/third_party/python/Include/
Dpymem.h67 #define PyMem_New(type, n) \ macro
86 #define PyMem_NEW(type, n) PyMem_New(type, n)
/third_party/python/Modules/
Datexitmodule.c63 state->callbacks = PyMem_New(atexit_callback*, state->callback_len); in _PyAtExit_Init()
Dselectmodule.c1567 evs = PyMem_New(struct epoll_event, maxevents); in select_epoll_poll_impl()
2147 chl = PyMem_New(struct kevent, nchanges); in select_kqueue_control_impl()
2168 evl = PyMem_New(struct kevent, maxevents); in select_kqueue_control_impl()
Ditertoolsmodule.c2267 indices = PyMem_New(Py_ssize_t, npools); in product_new()
2616 indices = PyMem_New(Py_ssize_t, r); in itertools_combinations_impl()
2953 indices = PyMem_New(Py_ssize_t, r); in itertools_combinations_with_replacement_impl()
3293 indices = PyMem_New(Py_ssize_t, n); in itertools_permutations_impl()
3294 cycles = PyMem_New(Py_ssize_t, r); in itertools_permutations_impl()
D_localemodule.c410 buf = PyMem_New(wchar_t, n1); in _locale_strxfrm_impl()
Dposixmodule.c4025 wnamebuf = PyMem_New(wchar_t, len + 5); in _listdir_windows_no_opendir()
4391 mountpath = PyMem_New(wchar_t, buflen); in os__getvolumepathname_impl()
7489 groups = PyMem_New(int, ngroups); in os_getgrouplist_impl()
7491 groups = PyMem_New(gid_t, ngroups); in os_getgrouplist_impl()
7593 alt_grouplist = PyMem_New(gid_t, n); in os_getgroups_impl()
7618 alt_grouplist = PyMem_New(gid_t, n); in os_getgroups_impl()
9485 *iov = PyMem_New(struct iovec, cnt); in iov_setup()
9491 *buf = PyMem_New(Py_buffer, cnt); in iov_setup()
11370 dir_path = PyMem_New(wchar_t, path->length + 1); in os__getdiskusage_impl()
13822 result = PyMem_New(wchar_t, size); in join_path_filenameW()
[all …]
Dpyexpat.c982 new_parser->handlers = PyMem_New(PyObject *, i); in pyexpat_xmlparser_ExternalEntityParserCreate_impl()
1174 self->handlers = PyMem_New(PyObject *, i); in newxmlparseobject()
Dsocketmodule.c4049 if (nitems > 0 && ((iovs = PyMem_New(struct iovec, nitems)) == NULL || in sock_recvmsg_into()
4050 (bufs = PyMem_New(Py_buffer, nitems)) == NULL)) { in sock_recvmsg_into()
4377 iovs = PyMem_New(struct iovec, ndataparts); in sock_sendmsg_iovec()
4384 databufs = PyMem_New(Py_buffer, ndataparts); in sock_sendmsg_iovec()
4488 if (ncmsgs > 0 && (cmsgs = PyMem_New(struct cmsginfo, ncmsgs)) == NULL) {
5397 name = PyMem_New(wchar_t, size);
D_sre.c421 state->mark = PyMem_New(const void *, pattern->groups * 2); in state_init()
D_testbuffer.c854 dest = PyMem_New(Py_ssize_t, len); in seq_as_ssize_array()
D_elementtree.c2308 it->parent_stack = PyMem_New(ParentLocator, INIT_PARENT_STACK_SIZE); in create_elementiter()
D_testcapimodule.c2000 buffer = PyMem_New(wchar_t, buflen); in unicode_aswidechar()
/third_party/python/Modules/_ctypes/
Dstgdict.c456 stgdict->ffi_type_pointer.elements = PyMem_New(ffi_type *, basedict->length + len + 1); in PyCStructUnionType_update_stgdict()
476 stgdict->ffi_type_pointer.elements = PyMem_New(ffi_type *, len + 1); in PyCStructUnionType_update_stgdict()
D_ctypes.c4665 dest = PyMem_New(wchar_t, slicelen); in Array_subscript()
5358 dest = PyMem_New(wchar_t, len); in Pointer_subscript()
/third_party/python/PC/
Dwinreg.c768 wchar_t **str = PyMem_New(wchar_t *, s); in Reg2Py()
1190 retValueBuf = PyMem_New(wchar_t, retValueSize); in winreg_EnumValue_impl()
1273 retValue = PyMem_New(wchar_t, retValueSize); in winreg_ExpandEnvironmentStrings_impl()
/third_party/python/Objects/
Dframeobject.c128 int64_t *blocks = PyMem_New(int64_t, len+1); in markblocks()
269 int *linestarts = PyMem_New(int, len); in marklines()
Dlistobject.c98 PyObject **items = PyMem_New(PyObject*, size); in list_preallocate_exact()
189 op->ob_item = PyMem_New(PyObject *, size); in list_new_prealloc()
Dtypeobject.c1838 remain = PyMem_New(int, to_merge_size); in pmerge()
1958 to_merge = PyMem_New(PyObject *, n + 1); in mro_implementation()
Dunicodeobject.c2665 result = PyMem_New(Py_UCS2, len); in unicode_askind()
2676 result = PyMem_New(Py_UCS4, len); in unicode_askind()
2717 target = PyMem_New(Py_UCS4, targetlen); in as_ucs4()
/third_party/python/Doc/c-api/
Dmemory.rst265 .. c:function:: TYPE* PyMem_New(TYPE, size_t n)
687 char *buf = PyMem_New(char, BUFSIZ); /* for I/O */
693 PyMem_Del(buf); /* allocated with PyMem_New */
703 char *buf1 = PyMem_New(char, BUFSIZ);
/third_party/python/Modules/_io/
Dwinconsoleio.c105 pname_buf = PyMem_New(wchar_t, length); in _PyIO_get_console_type()
/third_party/python/Doc/whatsnew/
D2.1.rst706 example, if memory was allocated using :func:`PyMem_New`, it has to be freed