Psyduck - 可達鴨 之 鴨力山大2


Server : LiteSpeed
System : Linux premium217.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : alloknri ( 880)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /opt/alt/python312/include/python3.12/cpython/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python312/include/python3.12/cpython/context.h
#ifndef Py_LIMITED_API
#ifndef Py_CONTEXT_H
#define Py_CONTEXT_H
#ifdef __cplusplus
extern "C" {
#endif

PyAPI_DATA(PyTypeObject) PyContext_Type;
typedef struct _pycontextobject PyContext;

PyAPI_DATA(PyTypeObject) PyContextVar_Type;
typedef struct _pycontextvarobject PyContextVar;

PyAPI_DATA(PyTypeObject) PyContextToken_Type;
typedef struct _pycontexttokenobject PyContextToken;


#define PyContext_CheckExact(o) Py_IS_TYPE((o), &PyContext_Type)
#define PyContextVar_CheckExact(o) Py_IS_TYPE((o), &PyContextVar_Type)
#define PyContextToken_CheckExact(o) Py_IS_TYPE((o), &PyContextToken_Type)


PyAPI_FUNC(PyObject *) PyContext_New(void);
PyAPI_FUNC(PyObject *) PyContext_Copy(PyObject *);
PyAPI_FUNC(PyObject *) PyContext_CopyCurrent(void);

PyAPI_FUNC(int) PyContext_Enter(PyObject *);
PyAPI_FUNC(int) PyContext_Exit(PyObject *);


/* Create a new context variable.

   default_value can be NULL.
*/
PyAPI_FUNC(PyObject *) PyContextVar_New(
    const char *name, PyObject *default_value);


/* Get a value for the variable.

   Returns -1 if an error occurred during lookup.

   Returns 0 if value either was or was not found.

   If value was found, *value will point to it.
   If not, it will point to:

   - default_value, if not NULL;
   - the default value of "var", if not NULL;
   - NULL.

   '*value' will be a new ref, if not NULL.
*/
PyAPI_FUNC(int) PyContextVar_Get(
    PyObject *var, PyObject *default_value, PyObject **value);


/* Set a new value for the variable.
   Returns NULL if an error occurs.
*/
PyAPI_FUNC(PyObject *) PyContextVar_Set(PyObject *var, PyObject *value);


/* Reset a variable to its previous value.
   Returns 0 on success, -1 on error.
*/
PyAPI_FUNC(int) PyContextVar_Reset(PyObject *var, PyObject *token);


/* This method is exposed only for CPython tests. Don not use it. */
PyAPI_FUNC(PyObject *) _PyContext_NewHamtForTests(void);


#ifdef __cplusplus
}
#endif
#endif /* !Py_CONTEXT_H */
#endif /* !Py_LIMITED_API */
Name
Size
Permissions
Options
abstract.h
7.686 KB
-rw-r--r--
bytearrayobject.h
1.136 KB
-rw-r--r--
bytesobject.h
4.551 KB
-rw-r--r--
cellobject.h
1.051 KB
-rw-r--r--
ceval.h
1.611 KB
-rw-r--r--
classobject.h
2.192 KB
-rw-r--r--
code.h
15.809 KB
-rw-r--r--
compile.h
2.598 KB
-rw-r--r--
complexobject.h
1.219 KB
-rw-r--r--
context.h
1.919 KB
-rw-r--r--
descrobject.h
1.604 KB
-rw-r--r--
dictobject.h
4.576 KB
-rw-r--r--
fileobject.h
0.799 KB
-rw-r--r--
fileutils.h
0.227 KB
-rw-r--r--
floatobject.h
0.879 KB
-rw-r--r--
frameobject.h
1.082 KB
-rw-r--r--
funcobject.h
7.02 KB
-rw-r--r--
genobject.h
3.238 KB
-rw-r--r--
import.h
1.585 KB
-rw-r--r--
initconfig.h
7.637 KB
-rw-r--r--
interpreteridobject.h
0.378 KB
-rw-r--r--
listobject.h
1.595 KB
-rw-r--r--
longintrepr.h
4.774 KB
-rw-r--r--
longobject.h
4.569 KB
-rw-r--r--
memoryobject.h
2.219 KB
-rw-r--r--
methodobject.h
2.223 KB
-rw-r--r--
modsupport.h
4.234 KB
-rw-r--r--
object.h
20.715 KB
-rw-r--r--
objimpl.h
3.238 KB
-rw-r--r--
odictobject.h
1.28 KB
-rw-r--r--
picklebufobject.h
0.828 KB
-rw-r--r--
pthread_stubs.h
3.423 KB
-rw-r--r--
pyctype.h
1.354 KB
-rw-r--r--
pydebug.h
1.38 KB
-rw-r--r--
pyerrors.h
4.176 KB
-rw-r--r--
pyfpe.h
0.434 KB
-rw-r--r--
pyframe.h
1.444 KB
-rw-r--r--
pylifecycle.h
3.343 KB
-rw-r--r--
pymem.h
3.3 KB
-rw-r--r--
pystate.h
16.824 KB
-rw-r--r--
pythonrun.h
4.788 KB
-rw-r--r--
pythread.h
1.385 KB
-rw-r--r--
pytime.h
12.111 KB
-rw-r--r--
setobject.h
2.096 KB
-rw-r--r--
sysmodule.h
0.478 KB
-rw-r--r--
traceback.h
0.434 KB
-rw-r--r--
tupleobject.h
1.345 KB
-rw-r--r--
unicodeobject.h
34.469 KB
-rw-r--r--
warnings.h
0.551 KB
-rw-r--r--
weakrefobject.h
1.984 KB
-rw-r--r--