📄 python_globals.h
字号:
/*
* ====================================================================
* python_globals.h
*
* Facilities to store static writable variables to thread local
* storage in Symbian environment.
*
* Copyright (c) 2005 Nokia Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
#ifndef __PYTHON_GLOBALS_H
#define __PYTHON_GLOBALS_H
#include "Python.h"
#include "importdl.h"
#include "grammar.h"
#include "pythread.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct wrapperbase slotdef;
typedef struct {
char *name;
PyObject **exc;
PyObject **base;
char *docstr;
PyMethodDef *methods;
int (*classinit)(PyObject *);
} t_exctable;
typedef struct {
PyTypeObject t_PyBuffer;
PyTypeObject t_PyType;
PyTypeObject t_PyBaseObject;
PyTypeObject t_PySuper;
PyTypeObject t_PyCell;
PyTypeObject t_PyClass;
PyTypeObject t_PyInstance;
PyTypeObject t_PyMethod;
PyTypeObject t_PyCObject;
PyTypeObject t_PyComplex;
PyTypeObject t_PyWrapperDescr;
PyTypeObject t_PyProperty;
PyTypeObject t_PyMethodDescr;
PyTypeObject t_PyMemberDescr;
PyTypeObject t_PyGetSetDescr;
PyTypeObject t_proxytype;
PyTypeObject t_wrappertype;
PyTypeObject t_PyDict;
PyTypeObject t_PyDictIter;
PyTypeObject t_PyFile;
PyTypeObject t_PyFloat;
PyTypeObject t_PyFrame;
PyTypeObject t_PyFunction;
PyTypeObject t_PyClassMethod;
PyTypeObject t_PyStaticMethod;
PyTypeObject t_PyInt;
PyTypeObject t_PyList;
PyTypeObject t_immutable_list_type;
PyTypeObject t_PyLong;
PyTypeObject t_PyCFunction;
PyTypeObject t_PyModule;
PyTypeObject t_PyNone;
PyTypeObject t_PyNotImplemented;
PyTypeObject t_PyRange;
PyTypeObject t_PySlice;
PyTypeObject t_PyString;
PyTypeObject t_PyTuple;
PyTypeObject t_PyUnicode;
PyTypeObject t_PySeqIter;
PyTypeObject t_PyCallIter;
PyTypeObject t__PyWeakref_Ref;
PyTypeObject t__PyWeakref_Proxy;
PyTypeObject t__PyWeakref_CallableProxy;
PyTypeObject t_struct_sequence_template;
PyTypeObject t_PyEllipsis;
PyTypeObject t_gentype;
PyTypeObject t_PyCode;
PyTypeObject t_PySymtableEntry;
PyTypeObject t_PyTraceBack;
PyTypeObject t_Lock;
PyTypeObject t_StructTimeType; // timemodule.c
PyTypeObject t_StatResultType; // posixmodule.c
PyTypeObject t_MD5; // md5module.c
PyTypeObject t_Pattern; // _sre.c
PyTypeObject t_Match; // _sre.c
PyTypeObject t_Scanner; // _sre.c
/* own extensions */
PyTypeObject t_Application;
PyTypeObject t_Listbox;
PyTypeObject t_Content_handler;
PyTypeObject t_Form;
PyTypeObject t_Text;
PyTypeObject t_Ao;
PyTypeObject t_Ao_callgate;
// Not here because we want to preserve binary compatibility for now. See the end of SPy_Python_globals.
//PyTypeObject t_Canvas;
} SPy_type_objects;
/*
* struct SPy_Python_globals that holds the globals
*/
typedef struct {
char buildinfo[50]; // Modules\getbuildinfo.c
PyObject* ZlibError; // Modules\zlibmodule.c
PyObject* StructError; // Modules\structmodule.c
PyObject* binascii_Error; // Modules\binascii.c
PyObject* binascii_Incomplete;
PyObject* moddict; // Modules\timemodule.c
#ifdef WITH_CYCLE_GC
void* gc_globals; // Modules\gcmodule.c
#endif
#ifdef not_def
grammar _PyParser_Grammar_mutable; // Parser\pythonrun.c
#endif
int (*PyOS_InputHook)(); // Parser\myreadline.c
char *(*PyOS_ReadlineFunctionPointer)(char *);
char grammar1_buf[100]; // Parser\grammar1.c
int listnode_level; // Parser\listnode.c
int listnode_atbol;
int _TabcheckFlag; // Parser\parsetok.c
#define NPENDINGCALLS 32
struct {
int (*func)(void *);
void *arg;
} pendingcalls[NPENDINGCALLS]; // Python\ceval.c
PyThread_type_lock interpreter_lock;
long main_thread;
int pendingfirst;
int pendinglast;
int things_to_do;
int recursion_limit;
int add_pending_call_busy;
int make_pending_calls_busy;
PyObject* implicit; // Python\compile.c
char ok_name_char[256];
PyObject* _PyExc_Exception; // Python\exceptions.c
PyObject* _PyExc_StopIteration;
PyObject* _PyExc_StandardError;
PyObject* _PyExc_ArithmeticError;
PyObject* _PyExc_LookupError;
PyObject* _PyExc_AssertionError;
PyObject* _PyExc_AttributeError;
PyObject* _PyExc_EOFError;
PyObject* _PyExc_FloatingPointError;
PyObject* _PyExc_EnvironmentError;
PyObject* _PyExc_IOError;
PyObject* _PyExc_OSError;
PyObject* _PyExc_SymbianError;
PyObject* _PyExc_ImportError;
PyObject* _PyExc_IndexError;
PyObject* _PyExc_KeyError;
PyObject* _PyExc_KeyboardInterrupt;
PyObject* _PyExc_MemoryError;
PyObject* _PyExc_NameError;
PyObject* _PyExc_OverflowError;
PyObject* _PyExc_RuntimeError;
PyObject* _PyExc_NotImplementedError;
PyObject* _PyExc_SyntaxError;
PyObject* _PyExc_IndentationError;
PyObject* _PyExc_TabError;
PyObject* _PyExc_ReferenceError;
PyObject* _PyExc_SystemError;
PyObject* _PyExc_SystemExit;
PyObject* _PyExc_TypeError;
PyObject* _PyExc_UnboundLocalError;
PyObject* _PyExc_UnicodeError;
PyObject* _PyExc_ValueError;
PyObject* _PyExc_ZeroDivisionError;
PyObject* _PyExc_MemoryErrorInst;
PyObject* _PyExc_Warning;
PyObject* _PyExc_UserWarning;
PyObject* _PyExc_DeprecationWarning;
PyObject* _PyExc_SyntaxWarning;
PyObject* _PyExc_OverflowWarning;
PyObject* _PyExc_RuntimeWarning;
t_exctable* exctable;
struct _frozen *PyImport_FrozenModules; // Python\frozen.c
int import_encodings_called; // Python\codecs.c
PyObject *_PyCodec_SearchPath;
PyObject *_PyCodec_SearchCache;
char version[250]; // Python\getversion.c
long imp_pyc_magic; // Python\import.c
PyObject *imp_extensions;
struct filedescr * imp__PyImport_Filetab;
PyThread_type_lock imp_import_lock;
long imp_import_lock_thread; // initialized to -1 in python_globals.cpp
int imp_import_lock_level;
PyObject *namestr;
PyObject *pathstr;
PyObject *imp_silly_list;
PyObject *imp_builtins_str;
PyObject *imp_import_str;
struct _inittab *imp_our_copy;
struct filedescr imp_fd_frozen;
struct filedescr imp_fd_builtin;
struct filedescr imp_fd_package;
struct filedescr imp_resfiledescr;
struct filedescr imp_coderesfiledescr;
struct _inittab *_PyImport_Inittab;
char *_Py_PackageContext; // Python\modsupport.c
PyThread_type_lock head_mutex; // Python\pystate.c
PyInterpreterState *interp_head;
PyThreadState *_g_PyThreadState_Current;
unaryfunc __PyThreadState_GetFrame;
int initialized; // Python\pythonrun.c
char* programname;
char *default_home;
int _PyThread_Started;
#define NEXITFUNCS 32
void (*exitfuncs[NEXITFUNCS])(void);
int nexitfuncs;
int _DebugFlag;
int _VerboseFlag;
int _InteractiveFlag;
int _OptimizeFlag;
int _NoSiteFlag;
int _FrozenFlag;
int _UnicodeFlag;
int _IgnoreEnvironmentFlag;
int _DivisionWarningFlag;
int _QnewFlag;
PyObject *whatstrings[4]; // Python\sysmodule.c
PyObject *warnoptions;
int thread_initialized; // Python\thread.c
int _PyOS_opterr; // Python\getopt.c
int _PyOS_optind;
char *_PyOS_optarg;
char *opt_ptr;
PyObject *__bases__; // Objects\abstract.c
PyObject *__class__;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -