Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
v2.1.3更新
Browse files Browse the repository at this point in the history
- 更新 python 3.11.0
- 适配新版 LL
  • Loading branch information
twoone3 committed Nov 14, 2022
1 parent 8d89b9a commit 7eccb9b
Show file tree
Hide file tree
Showing 157 changed files with 7,376 additions and 3,167 deletions.
6 changes: 3 additions & 3 deletions RELEASENOTE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
v2.1.2����
- �Ƴ��� onMove �¼�
- ���� SDK
v2.1.3更新
- 更新 python 3.11.0
- 适配新版 LL
2 changes: 1 addition & 1 deletion SDK
Submodule SDK updated from 9a3224 to 828427
97 changes: 29 additions & 68 deletions include/Python.h
Original file line number Diff line number Diff line change
@@ -1,88 +1,56 @@
// Entry point of the Python C API.
// C extensions should only #include <Python.h>, and not include directly
// the other Python header files included by <Python.h>.

#ifndef Py_PYTHON_H
#define Py_PYTHON_H
/* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */

/* Include nearly all Python header files */
// Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" {

// Include Python header files
#include "patchlevel.h"
#include "pyconfig.h"
#include "pymacconfig.h"

#include <limits.h>

#ifndef UCHAR_MAX
#error "Something's broken. UCHAR_MAX should be defined in limits.h."
#endif

#if UCHAR_MAX != 255
#error "Python's source code assumes C's unsigned char is an 8-bit type."
#endif

#if defined(__sgi) && !defined(_SGI_MP_SOURCE)
#define _SGI_MP_SOURCE
# define _SGI_MP_SOURCE
#endif

#include <stdio.h>
#ifndef NULL
# error "Python.h requires that stdio.h define NULL."
// stdlib.h, stdio.h, errno.h and string.h headers are not used by Python
// headers, but kept for backward compatibility. They are excluded from the
// limited C API of Python 3.11.
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
# include <stdlib.h>
# include <stdio.h> // FILE*
# include <errno.h> // errno
# include <string.h> // memcpy()
#endif

#include <string.h>
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#include <stdlib.h>
#ifndef MS_WINDOWS
#include <unistd.h>
# include <unistd.h>
#endif

/* For size_t? */
#ifdef HAVE_STDDEF_H
#include <stddef.h>
# include <stddef.h> // size_t
#endif

/* CAUTION: Build setups should ensure that NDEBUG is defined on the
* compiler command line when building Python in release mode; else
* assert() calls won't be removed.
*/
#include <assert.h>
#include <assert.h> // assert()
#include <wchar.h> // wchar_t

#include "pyport.h"
#include "pymacro.h"

/* A convenient way for code to know if sanitizers are enabled. */
#if defined(__has_feature)
# if __has_feature(memory_sanitizer)
# if !defined(_Py_MEMORY_SANITIZER)
# define _Py_MEMORY_SANITIZER
# endif
# endif
# if __has_feature(address_sanitizer)
# if !defined(_Py_ADDRESS_SANITIZER)
# define _Py_ADDRESS_SANITIZER
# endif
# endif
#elif defined(__GNUC__)
# if defined(__SANITIZE_ADDRESS__)
# define _Py_ADDRESS_SANITIZER
# endif
#endif

#include "pymath.h"
#include "pymem.h"

#include "pytypedefs.h"
#include "pybuffer.h"
#include "object.h"
#include "objimpl.h"
#include "typeslots.h"
#include "pyhash.h"

#include "cpython/pydebug.h"

#include "bytearrayobject.h"
#include "bytesobject.h"
#include "unicodeobject.h"
#include "longobject.h"
#include "longintrepr.h"
#include "cpython/longintrepr.h"
#include "boolobject.h"
#include "floatobject.h"
#include "complexobject.h"
Expand All @@ -96,33 +64,30 @@
#include "setobject.h"
#include "methodobject.h"
#include "moduleobject.h"
#include "funcobject.h"
#include "classobject.h"
#include "cpython/funcobject.h"
#include "cpython/classobject.h"
#include "fileobject.h"
#include "pycapsule.h"
#include "code.h"
#include "cpython/code.h"
#include "pyframe.h"
#include "traceback.h"
#include "sliceobject.h"
#include "cellobject.h"
#include "cpython/cellobject.h"
#include "iterobject.h"
#include "cpython/initconfig.h"
#include "genobject.h"
#include "pystate.h"
#include "cpython/genobject.h"
#include "descrobject.h"
#include "genericaliasobject.h"
#include "warnings.h"
#include "weakrefobject.h"
#include "structseq.h"
#include "namespaceobject.h"
#include "cpython/picklebufobject.h"
#include "cpython/pytime.h"

#include "codecs.h"
#include "pyerrors.h"
#include "pythread.h"
#include "pystate.h"
#include "context.h"

#include "cpython/context.h"
#include "modsupport.h"
#include "compile.h"
#include "pythonrun.h"
Expand All @@ -132,12 +97,8 @@
#include "osmodule.h"
#include "intrcheck.h"
#include "import.h"

#include "abstract.h"
#include "bltinmodule.h"

#include "eval.h"

#include "cpython/pyctype.h"
#include "pystrtod.h"
#include "pystrcmp.h"
Expand Down
2 changes: 1 addition & 1 deletion include/abstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ PyAPI_FUNC(int) PyObject_IsSubclass(PyObject *object, PyObject *typeorclass);

#ifndef Py_LIMITED_API
# define Py_CPYTHON_ABSTRACTOBJECT_H
# include "cpython/abstract.h"
# include "cpython/abstract.h"
# undef Py_CPYTHON_ABSTRACTOBJECT_H
#endif

Expand Down
4 changes: 2 additions & 2 deletions include/boolobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ PyAPI_DATA(PyTypeObject) PyBool_Type;
Don't forget to apply Py_INCREF() when returning either!!! */

/* Don't use these directly */
PyAPI_DATA(struct _longobject) _Py_FalseStruct;
PyAPI_DATA(struct _longobject) _Py_TrueStruct;
PyAPI_DATA(PyLongObject) _Py_FalseStruct;
PyAPI_DATA(PyLongObject) _Py_TrueStruct;

/* Use these macros */
#define Py_False ((PyObject *) &_Py_FalseStruct)
Expand Down
4 changes: 1 addition & 3 deletions include/bytearrayobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
extern "C" {
#endif

#include <stdarg.h>

/* Type PyByteArrayObject represents a mutable array of bytes.
* The Python API is that of a sequence;
* the bytes are mapped to ints in [0, 256).
Expand Down Expand Up @@ -36,7 +34,7 @@ PyAPI_FUNC(int) PyByteArray_Resize(PyObject *, Py_ssize_t);

#ifndef Py_LIMITED_API
# define Py_CPYTHON_BYTEARRAYOBJECT_H
# include "cpython/bytearrayobject.h"
# include "cpython/bytearrayobject.h"
# undef Py_CPYTHON_BYTEARRAYOBJECT_H
#endif

Expand Down
4 changes: 2 additions & 2 deletions include/bytesobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
extern "C" {
#endif

#include <stdarg.h>
#include <stdarg.h> // va_list

/*
Type PyBytesObject represents a byte string. An extra zero byte is
Expand Down Expand Up @@ -59,7 +59,7 @@ PyAPI_FUNC(int) PyBytes_AsStringAndSize(

#ifndef Py_LIMITED_API
# define Py_CPYTHON_BYTESOBJECT_H
# include "cpython/bytesobject.h"
# include "cpython/bytesobject.h"
# undef Py_CPYTHON_BYTESOBJECT_H
#endif

Expand Down
14 changes: 12 additions & 2 deletions include/ceval.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
/* Interface to random parts in ceval.c */

#ifndef Py_CEVAL_H
#define Py_CEVAL_H
#ifdef __cplusplus
extern "C" {
#endif


/* Interface to random parts in ceval.c */
PyAPI_FUNC(PyObject *) PyEval_EvalCode(PyObject *, PyObject *, PyObject *);

PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx(PyObject *co,
PyObject *globals,
PyObject *locals,
PyObject *const *args, int argc,
PyObject *const *kwds, int kwdc,
PyObject *const *defs, int defc,
PyObject *kwdefs, PyObject *closure);

/* PyEval_CallObjectWithKeywords(), PyEval_CallObject(), PyEval_CallFunction
* and PyEval_CallMethod are deprecated. Since they are officially part of the
Expand Down Expand Up @@ -148,7 +158,7 @@ PyAPI_FUNC(void) PyEval_ReleaseThread(PyThreadState *tstate);

#ifndef Py_LIMITED_API
# define Py_CPYTHON_CEVAL_H
# include "cpython/ceval.h"
# include "cpython/ceval.h"
# undef Py_CPYTHON_CEVAL_H
#endif

Expand Down
20 changes: 0 additions & 20 deletions include/code.h

This file was deleted.

45 changes: 3 additions & 42 deletions include/complexobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,61 +6,22 @@
extern "C" {
#endif

#ifndef Py_LIMITED_API
typedef struct {
double real;
double imag;
} Py_complex;

/* Operations on complex numbers from complexmodule.c */

PyAPI_FUNC(Py_complex) _Py_c_sum(Py_complex, Py_complex);
PyAPI_FUNC(Py_complex) _Py_c_diff(Py_complex, Py_complex);
PyAPI_FUNC(Py_complex) _Py_c_neg(Py_complex);
PyAPI_FUNC(Py_complex) _Py_c_prod(Py_complex, Py_complex);
PyAPI_FUNC(Py_complex) _Py_c_quot(Py_complex, Py_complex);
PyAPI_FUNC(Py_complex) _Py_c_pow(Py_complex, Py_complex);
PyAPI_FUNC(double) _Py_c_abs(Py_complex);
#endif

/* Complex object interface */

/*
PyComplexObject represents a complex number with double-precision
real and imaginary parts.
*/
#ifndef Py_LIMITED_API
typedef struct {
PyObject_HEAD
Py_complex cval;
} PyComplexObject;
#endif

PyAPI_DATA(PyTypeObject) PyComplex_Type;

#define PyComplex_Check(op) PyObject_TypeCheck(op, &PyComplex_Type)
#define PyComplex_CheckExact(op) Py_IS_TYPE(op, &PyComplex_Type)

#ifndef Py_LIMITED_API
PyAPI_FUNC(PyObject *) PyComplex_FromCComplex(Py_complex);
#endif
PyAPI_FUNC(PyObject *) PyComplex_FromDoubles(double real, double imag);

PyAPI_FUNC(double) PyComplex_RealAsDouble(PyObject *op);
PyAPI_FUNC(double) PyComplex_ImagAsDouble(PyObject *op);
#ifndef Py_LIMITED_API
PyAPI_FUNC(Py_complex) PyComplex_AsCComplex(PyObject *op);
#endif

/* Format the object based on the format_spec, as defined in PEP 3101
(Advanced String Formatting). */
#ifndef Py_LIMITED_API
PyAPI_FUNC(int) _PyComplex_FormatAdvancedWriter(
_PyUnicodeWriter *writer,
PyObject *obj,
PyObject *format_spec,
Py_ssize_t start,
Py_ssize_t end);
# define Py_CPYTHON_COMPLEXOBJECT_H
# include "cpython/complexobject.h"
# undef Py_CPYTHON_COMPLEXOBJECT_H
#endif

#ifdef __cplusplus
Expand Down
Loading

0 comments on commit 7eccb9b

Please sign in to comment.