Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/python2....
File: ceval.h
#ifndef Py_CEVAL_H
[0] Fix | Delete
#define Py_CEVAL_H
[1] Fix | Delete
#ifdef __cplusplus
[2] Fix | Delete
extern "C" {
[3] Fix | Delete
#endif
[4] Fix | Delete
[5] Fix | Delete
[6] Fix | Delete
/* Interface to random parts in ceval.c */
[7] Fix | Delete
[8] Fix | Delete
PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
[9] Fix | Delete
PyObject *, PyObject *, PyObject *);
[10] Fix | Delete
[11] Fix | Delete
/* Inline this */
[12] Fix | Delete
#define PyEval_CallObject(func,arg) \
[13] Fix | Delete
PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL)
[14] Fix | Delete
[15] Fix | Delete
PyAPI_FUNC(PyObject *) PyEval_CallFunction(PyObject *obj,
[16] Fix | Delete
const char *format, ...);
[17] Fix | Delete
PyAPI_FUNC(PyObject *) PyEval_CallMethod(PyObject *obj,
[18] Fix | Delete
const char *methodname,
[19] Fix | Delete
const char *format, ...);
[20] Fix | Delete
[21] Fix | Delete
PyAPI_FUNC(void) PyEval_SetProfile(Py_tracefunc, PyObject *);
[22] Fix | Delete
PyAPI_FUNC(void) PyEval_SetTrace(Py_tracefunc, PyObject *);
[23] Fix | Delete
[24] Fix | Delete
struct _frame; /* Avoid including frameobject.h */
[25] Fix | Delete
[26] Fix | Delete
PyAPI_FUNC(PyObject *) PyEval_GetBuiltins(void);
[27] Fix | Delete
PyAPI_FUNC(PyObject *) PyEval_GetGlobals(void);
[28] Fix | Delete
PyAPI_FUNC(PyObject *) PyEval_GetLocals(void);
[29] Fix | Delete
PyAPI_FUNC(struct _frame *) PyEval_GetFrame(void);
[30] Fix | Delete
PyAPI_FUNC(int) PyEval_GetRestricted(void);
[31] Fix | Delete
[32] Fix | Delete
/* Look at the current frame's (if any) code's co_flags, and turn on
[33] Fix | Delete
the corresponding compiler flags in cf->cf_flags. Return 1 if any
[34] Fix | Delete
flag was set, else return 0. */
[35] Fix | Delete
PyAPI_FUNC(int) PyEval_MergeCompilerFlags(PyCompilerFlags *cf);
[36] Fix | Delete
[37] Fix | Delete
PyAPI_FUNC(int) Py_FlushLine(void);
[38] Fix | Delete
[39] Fix | Delete
PyAPI_FUNC(int) Py_AddPendingCall(int (*func)(void *), void *arg);
[40] Fix | Delete
PyAPI_FUNC(int) Py_MakePendingCalls(void);
[41] Fix | Delete
[42] Fix | Delete
/* Protection against deeply nested recursive calls */
[43] Fix | Delete
PyAPI_FUNC(void) Py_SetRecursionLimit(int);
[44] Fix | Delete
PyAPI_FUNC(int) Py_GetRecursionLimit(void);
[45] Fix | Delete
[46] Fix | Delete
#define Py_EnterRecursiveCall(where) \
[47] Fix | Delete
(_Py_MakeRecCheck(PyThreadState_GET()->recursion_depth) && \
[48] Fix | Delete
_Py_CheckRecursiveCall(where))
[49] Fix | Delete
#define Py_LeaveRecursiveCall() \
[50] Fix | Delete
(--PyThreadState_GET()->recursion_depth)
[51] Fix | Delete
PyAPI_FUNC(int) _Py_CheckRecursiveCall(const char *where);
[52] Fix | Delete
PyAPI_DATA(int) _Py_CheckRecursionLimit;
[53] Fix | Delete
#ifdef USE_STACKCHECK
[54] Fix | Delete
# define _Py_MakeRecCheck(x) (++(x) > --_Py_CheckRecursionLimit)
[55] Fix | Delete
#else
[56] Fix | Delete
# define _Py_MakeRecCheck(x) (++(x) > _Py_CheckRecursionLimit)
[57] Fix | Delete
#endif
[58] Fix | Delete
[59] Fix | Delete
PyAPI_FUNC(const char *) PyEval_GetFuncName(PyObject *);
[60] Fix | Delete
PyAPI_FUNC(const char *) PyEval_GetFuncDesc(PyObject *);
[61] Fix | Delete
[62] Fix | Delete
PyAPI_FUNC(PyObject *) PyEval_GetCallStats(PyObject *);
[63] Fix | Delete
PyAPI_FUNC(PyObject *) PyEval_EvalFrame(struct _frame *);
[64] Fix | Delete
PyAPI_FUNC(PyObject *) PyEval_EvalFrameEx(struct _frame *f, int exc);
[65] Fix | Delete
[66] Fix | Delete
/* this used to be handled on a per-thread basis - now just two globals */
[67] Fix | Delete
PyAPI_DATA(volatile int) _Py_Ticker;
[68] Fix | Delete
PyAPI_DATA(int) _Py_CheckInterval;
[69] Fix | Delete
[70] Fix | Delete
/* Interface for threads.
[71] Fix | Delete
[72] Fix | Delete
A module that plans to do a blocking system call (or something else
[73] Fix | Delete
that lasts a long time and doesn't touch Python data) can allow other
[74] Fix | Delete
threads to run as follows:
[75] Fix | Delete
[76] Fix | Delete
...preparations here...
[77] Fix | Delete
Py_BEGIN_ALLOW_THREADS
[78] Fix | Delete
...blocking system call here...
[79] Fix | Delete
Py_END_ALLOW_THREADS
[80] Fix | Delete
...interpret result here...
[81] Fix | Delete
[82] Fix | Delete
The Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS pair expands to a
[83] Fix | Delete
{}-surrounded block.
[84] Fix | Delete
To leave the block in the middle (e.g., with return), you must insert
[85] Fix | Delete
a line containing Py_BLOCK_THREADS before the return, e.g.
[86] Fix | Delete
[87] Fix | Delete
if (...premature_exit...) {
[88] Fix | Delete
Py_BLOCK_THREADS
[89] Fix | Delete
PyErr_SetFromErrno(PyExc_IOError);
[90] Fix | Delete
return NULL;
[91] Fix | Delete
}
[92] Fix | Delete
[93] Fix | Delete
An alternative is:
[94] Fix | Delete
[95] Fix | Delete
Py_BLOCK_THREADS
[96] Fix | Delete
if (...premature_exit...) {
[97] Fix | Delete
PyErr_SetFromErrno(PyExc_IOError);
[98] Fix | Delete
return NULL;
[99] Fix | Delete
}
[100] Fix | Delete
Py_UNBLOCK_THREADS
[101] Fix | Delete
[102] Fix | Delete
For convenience, that the value of 'errno' is restored across
[103] Fix | Delete
Py_END_ALLOW_THREADS and Py_BLOCK_THREADS.
[104] Fix | Delete
[105] Fix | Delete
WARNING: NEVER NEST CALLS TO Py_BEGIN_ALLOW_THREADS AND
[106] Fix | Delete
Py_END_ALLOW_THREADS!!!
[107] Fix | Delete
[108] Fix | Delete
The function PyEval_InitThreads() should be called only from
[109] Fix | Delete
initthread() in "threadmodule.c".
[110] Fix | Delete
[111] Fix | Delete
Note that not yet all candidates have been converted to use this
[112] Fix | Delete
mechanism!
[113] Fix | Delete
*/
[114] Fix | Delete
[115] Fix | Delete
PyAPI_FUNC(PyThreadState *) PyEval_SaveThread(void);
[116] Fix | Delete
PyAPI_FUNC(void) PyEval_RestoreThread(PyThreadState *);
[117] Fix | Delete
[118] Fix | Delete
#ifdef WITH_THREAD
[119] Fix | Delete
[120] Fix | Delete
PyAPI_FUNC(int) PyEval_ThreadsInitialized(void);
[121] Fix | Delete
PyAPI_FUNC(void) PyEval_InitThreads(void);
[122] Fix | Delete
PyAPI_FUNC(void) PyEval_AcquireLock(void);
[123] Fix | Delete
PyAPI_FUNC(void) PyEval_ReleaseLock(void);
[124] Fix | Delete
PyAPI_FUNC(void) PyEval_AcquireThread(PyThreadState *tstate);
[125] Fix | Delete
PyAPI_FUNC(void) PyEval_ReleaseThread(PyThreadState *tstate);
[126] Fix | Delete
PyAPI_FUNC(void) PyEval_ReInitThreads(void);
[127] Fix | Delete
[128] Fix | Delete
#define Py_BEGIN_ALLOW_THREADS { \
[129] Fix | Delete
PyThreadState *_save; \
[130] Fix | Delete
_save = PyEval_SaveThread();
[131] Fix | Delete
#define Py_BLOCK_THREADS PyEval_RestoreThread(_save);
[132] Fix | Delete
#define Py_UNBLOCK_THREADS _save = PyEval_SaveThread();
[133] Fix | Delete
#define Py_END_ALLOW_THREADS PyEval_RestoreThread(_save); \
[134] Fix | Delete
}
[135] Fix | Delete
[136] Fix | Delete
#else /* !WITH_THREAD */
[137] Fix | Delete
[138] Fix | Delete
#define Py_BEGIN_ALLOW_THREADS {
[139] Fix | Delete
#define Py_BLOCK_THREADS
[140] Fix | Delete
#define Py_UNBLOCK_THREADS
[141] Fix | Delete
#define Py_END_ALLOW_THREADS }
[142] Fix | Delete
[143] Fix | Delete
#endif /* !WITH_THREAD */
[144] Fix | Delete
[145] Fix | Delete
PyAPI_FUNC(int) _PyEval_SliceIndex(PyObject *, Py_ssize_t *);
[146] Fix | Delete
PyAPI_FUNC(int) _PyEval_SliceIndexNotNone(PyObject *, Py_ssize_t *);
[147] Fix | Delete
[148] Fix | Delete
[149] Fix | Delete
#ifdef __cplusplus
[150] Fix | Delete
}
[151] Fix | Delete
#endif
[152] Fix | Delete
#endif /* !Py_CEVAL_H */
[153] Fix | Delete
[154] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function