Back to index

python3.2  3.2.2
Defines | Functions | Variables
pymem.h File Reference
#include "pyport.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define PyMem_MALLOC(n)
#define PyMem_REALLOC(p, n)
#define PyMem_FREE   free
#define PyMem_New(type, n)
#define PyMem_NEW(type, n)
#define PyMem_Resize(p, type, n)
#define PyMem_RESIZE(p, type, n)
#define PyMem_Del   PyMem_Free
#define PyMem_DEL   PyMem_FREE

Functions

 PyAPI_FUNC (void *) PyMem_Malloc(size_t)
 PyAPI_FUNC (void) PyMem_Free(void *)

Variables

 size_t

Define Documentation

#define PyMem_Del   PyMem_Free

Definition at line 115 of file pymem.h.

#define PyMem_DEL   PyMem_FREE

Definition at line 116 of file pymem.h.

#define PyMem_FREE   free

Definition at line 78 of file pymem.h.

#define PyMem_MALLOC (   n)
Value:
((size_t)(n) > (size_t)PY_SSIZE_T_MAX ? NULL \
                            : malloc((n) ? (n) : 1))

Definition at line 74 of file pymem.h.

#define PyMem_New (   type,
  n 
)
Value:
( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL :       \
       ( (type *) PyMem_Malloc((n) * sizeof(type)) ) )

Definition at line 92 of file pymem.h.

#define PyMem_NEW (   type,
  n 
)
Value:
( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL :       \
       ( (type *) PyMem_MALLOC((n) * sizeof(type)) ) )

Definition at line 95 of file pymem.h.

#define PyMem_REALLOC (   p,
  n 
)
Value:
((size_t)(n) > (size_t)PY_SSIZE_T_MAX  ? NULL \
                            : realloc((p), (n) ? (n) : 1))

Definition at line 76 of file pymem.h.

#define PyMem_Resize (   p,
  type,
  n 
)
Value:
( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
       (type *) PyMem_Realloc((p), (n) * sizeof(type)) )

Definition at line 105 of file pymem.h.

#define PyMem_RESIZE (   p,
  type,
  n 
)
Value:
( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
       (type *) PyMem_REALLOC((p), (n) * sizeof(type)) )

Definition at line 108 of file pymem.h.


Function Documentation

PyAPI_FUNC ( void )

Definition at line 1904 of file object.c.


Variable Documentation

Definition at line 53 of file pymem.h.