/
opt
/
alt
/
python27
/
include
/
python2.7
/
/opt/alt/python27/include/python2.7
mkdir
upload
Name
Size
Mode
Actions
abstract.h
45225
0644
edit
dl
rm
asdl.h
1099
0644
edit
dl
rm
ast.h
230
0644
edit
dl
rm
bitset.h
792
0644
edit
dl
rm
boolobject.h
912
0644
edit
dl
rm
bufferobject.h
922
0644
edit
dl
rm
bytearrayobject.h
1941
0644
edit
dl
rm
bytesobject.h
1152
0644
edit
dl
rm
bytes_methods.h
2804
0644
edit
dl
rm
cellobject.h
651
0644
edit
dl
rm
ceval.h
5061
0644
edit
dl
rm
classobject.h
3002
0644
edit
dl
rm
cobject.h
2930
0644
edit
dl
rm
code.h
4407
0644
edit
dl
rm
codecs.h
6171
0644
edit
dl
rm
compile.h
1065
0644
edit
dl
rm
complexobject.h
1853
0644
edit
dl
rm
cStringIO.h
2005
0644
edit
dl
rm
datetime.h
8313
0644
edit
dl
rm
descrobject.h
2480
0644
edit
dl
rm
dictobject.h
6892
0644
edit
dl
rm
dtoa.h
338
0644
edit
dl
rm
enumobject.h
253
0644
edit
dl
rm
errcode.h
1399
0644
edit
dl
rm
eval.h
557
0644
edit
dl
rm
fileobject.h
3662
0644
edit
dl
rm
floatobject.h
5625
0644
edit
dl
rm
frameobject.h
3254
0644
edit
dl
rm
funcobject.h
2995
0644
edit
dl
rm
genobject.h
891
0644
edit
dl
rm
graminit.h
1917
0644
edit
dl
rm
grammar.h
2051
0644
edit
dl
rm
import.h
2223
0644
edit
dl
rm
intobject.h
2976
0644
edit
dl
rm
intrcheck.h
274
0644
edit
dl
rm
iterobject.h
522
0644
edit
dl
rm
listobject.h
2569
0644
edit
dl
rm
longintrepr.h
3907
0644
edit
dl
rm
longobject.h
5809
0644
edit
dl
rm
marshal.h
713
0644
edit
dl
rm
memoryobject.h
2823
0644
edit
dl
rm
metagrammar.h
253
0644
edit
dl
rm
methodobject.h
3355
0644
edit
dl
rm
modsupport.h
5024
0644
edit
dl
rm
moduleobject.h
609
0644
edit
dl
rm
node.h
938
0644
edit
dl
rm
object.h
40059
0644
edit
dl
rm
objimpl.h
14338
0644
edit
dl
rm
opcode.h
4814
0644
edit
dl
rm
osdefs.h
1059
0644
edit
dl
rm
parsetok.h
1780
0644
edit
dl
rm
patchlevel.h
1450
0644
edit
dl
rm
pgen.h
253
0644
edit
dl
rm
pgenheaders.h
1180
0644
edit
dl
rm
pyarena.h
2693
0644
edit
dl
rm
pycapsule.h
1679
0644
edit
dl
rm
pyconfig-64.h
37841
0644
edit
dl
rm
pyconfig.h
162
0644
edit
dl
rm
pyctype.h
1268
0644
edit
dl
rm
pydebug.h
1322
0644
edit
dl
rm
pyerrors.h
11741
0644
edit
dl
rm
pyexpat.h
2117
0644
edit
dl
rm
pyfpe.h
8471
0644
edit
dl
rm
pygetopt.h
348
0644
edit
dl
rm
pymacconfig.h
2989
0644
edit
dl
rm
pymactoolbox.h
8628
0644
edit
dl
rm
pymath.h
7332
0644
edit
dl
rm
pymem.h
4712
0644
edit
dl
rm
pyport.h
32558
0644
edit
dl
rm
pystate.h
6403
0644
edit
dl
rm
pystrcmp.h
463
0644
edit
dl
rm
pystrtod.h
1582
0644
edit
dl
rm
Python-ast.h
21113
0644
edit
dl
rm
Python.h
4375
0644
edit
dl
rm
pythonrun.h
7234
0644
edit
dl
rm
pythread.h
1155
0644
edit
dl
rm
py_curses.h
4273
0644
edit
dl
rm
rangeobject.h
646
0644
edit
dl
rm
setobject.h
3077
0644
edit
dl
rm
sliceobject.h
1681
0644
edit
dl
rm
stringobject.h
7979
0644
edit
dl
rm
structmember.h
2901
0644
edit
dl
rm
structseq.h
862
0644
edit
dl
rm
symtable.h
3724
0644
edit
dl
rm
sysmodule.h
865
0644
edit
dl
rm
timefuncs.h
541
0644
edit
dl
rm
token.h
1799
0644
edit
dl
rm
traceback.h
697
0644
edit
dl
rm
tupleobject.h
2175
0644
edit
dl
rm
ucnhash.h
924
0644
edit
dl
rm
unicodeobject.h
52227
0644
edit
dl
rm
warnings.h
635
0644
edit
dl
rm
weakrefobject.h
2801
0644
edit
dl
rm
Edit:
/opt/alt/python27/include/python2.7/pymem.h
(4712B)
/* The PyMem_ family: low-level memory allocation interfaces. See objimpl.h for the PyObject_ memory family. */ #ifndef Py_PYMEM_H #define Py_PYMEM_H #include "pyport.h" #ifdef __cplusplus extern "C" { #endif /* BEWARE: Each interface exports both functions and macros. Extension modules should use the functions, to ensure binary compatibility across Python versions. Because the Python implementation is free to change internal details, and the macros may (or may not) expose details for speed, if you do use the macros you must recompile your extensions with each Python release. Never mix calls to PyMem_ with calls to the platform malloc/realloc/ calloc/free. For example, on Windows different DLLs may end up using different heaps, and if you use PyMem_Malloc you'll get the memory from the heap used by the Python DLL; it could be a disaster if you free()'ed that directly in your own extension. Using PyMem_Free instead ensures Python can return the memory to the proper heap. As another example, in PYMALLOC_DEBUG mode, Python wraps all calls to all PyMem_ and PyObject_ memory functions in special debugging wrappers that add additional debugging info to dynamic memory blocks. The system routines have no idea what to do with that stuff, and the Python wrappers have no idea what to do with raw blocks obtained directly by the system routines then. The GIL must be held when using these APIs. */ /* * Raw memory interface * ==================== */ /* Functions Functions supplying platform-independent semantics for malloc/realloc/ free. These functions make sure that allocating 0 bytes returns a distinct non-NULL pointer (whenever possible -- if we're flat out of memory, NULL may be returned), even if the platform malloc and realloc don't. Returned pointers must be checked for NULL explicitly. No action is performed on failure (no exception is set, no warning is printed, etc). */ PyAPI_FUNC(void *) PyMem_Malloc(size_t); PyAPI_FUNC(void *) PyMem_Realloc(void *, size_t); PyAPI_FUNC(void) PyMem_Free(void *); /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are no longer supported. They used to call PyErr_NoMemory() on failure. */ /* Macros. */ #ifdef PYMALLOC_DEBUG /* Redirect all memory operations to Python's debugging allocator. */ #define PyMem_MALLOC _PyMem_DebugMalloc #define PyMem_REALLOC _PyMem_DebugRealloc #define PyMem_FREE _PyMem_DebugFree #else /* ! PYMALLOC_DEBUG */ /* PyMem_MALLOC(0) means malloc(1). Some systems would return NULL for malloc(0), which would be treated as an error. Some platforms would return a pointer with no memory behind it, which would break pymalloc. To solve these problems, allocate an extra byte. */ /* Returns NULL to indicate error if a negative size or size larger than Py_ssize_t can represent is supplied. Helps prevents security holes. */ #define PyMem_MALLOC(n) ((size_t)(n) > (size_t)PY_SSIZE_T_MAX ? NULL \ : malloc(((n) != 0) ? (n) : 1)) #define PyMem_REALLOC(p, n) ((size_t)(n) > (size_t)PY_SSIZE_T_MAX ? NULL \ : realloc((p), ((n) != 0) ? (n) : 1)) #define PyMem_FREE free #endif /* PYMALLOC_DEBUG */ /* * Type-oriented memory interface * ============================== * * Allocate memory for n objects of the given type. Returns a new pointer * or NULL if the request was too large or memory allocation failed. Use * these macros rather than doing the multiplication yourself so that proper * overflow checking is always done. */ #define PyMem_New(type, n) \ ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ ( (type *) PyMem_Malloc((n) * sizeof(type)) ) ) #define PyMem_NEW(type, n) \ ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ ( (type *) PyMem_MALLOC((n) * sizeof(type)) ) ) /* * The value of (p) is always clobbered by this macro regardless of success. * The caller MUST check if (p) is NULL afterwards and deal with the memory * error if so. This means the original value of (p) MUST be saved for the * caller's memory error handler to not lose track of it. */ #define PyMem_Resize(p, type, n) \ ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ (type *) PyMem_Realloc((p), (n) * sizeof(type)) ) #define PyMem_RESIZE(p, type, n) \ ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ (type *) PyMem_REALLOC((p), (n) * sizeof(type)) ) /* PyMem{Del,DEL} are left over from ancient days, and shouldn't be used * anymore. They're just confusing aliases for PyMem_{Free,FREE} now. */ #define PyMem_Del PyMem_Free #define PyMem_DEL PyMem_FREE #ifdef __cplusplus } #endif #endif /* !Py_PYMEM_H */
Save
cmd:
run