path stringlengths 14 112 | content stringlengths 0 6.32M | size int64 0 6.32M | max_lines int64 1 100k | repo_name stringclasses 2
values | autogenerated bool 1
class |
|---|---|---|---|---|---|
cosmopolitan/third_party/python/Objects/stringlib/ucs1lib.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,073 | 39 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Objects/stringlib/partition.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 3,935 | 125 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Objects/stringlib/ucs2lib.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,074 | 38 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Objects/stringlib/localeutil.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 3,391 | 91 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Objects/stringlib/find.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 4,151 | 129 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Objects/stringlib/find_max_char.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 4,662 | 143 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Objects/stringlib/stringdefs.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,039 | 37 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Objects/stringlib/replace.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,681 | 62 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Objects/stringlib/codecs.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 28,662 | 831 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Objects/stringlib/ucs4lib.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,076 | 38 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Objects/stringlib/count.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 1,496 | 36 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Objects/stringlib/split.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 12,138 | 399 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Objects/stringlib/join.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 4,730 | 149 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Objects/stringlib/asciilib.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,096 | 38 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Objects/stringlib/unicode_format.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 41,975 | 1,297 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Objects/stringlib/fastsearch.inc | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 8,560 | 259 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/import.h | #ifndef Py_IMPORT_H
#define Py_IMPORT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#ifndef Py_LIMITED_API
void _PyImportZip_Init(void);
PyMODINIT_FUNC PyInit_imp(void);
#endif /* !Py_LIMITED_API */
long PyImport_GetMagicNumber(void);
const char * PyImport_GetMagicTag(v... | 4,054 | 140 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/Python-ast.h | #ifndef COSMOPOLITAN_THIRD_PARTY_PYTHON_INCLUDE_PYTHON_AST_H_
#define COSMOPOLITAN_THIRD_PARTY_PYTHON_INCLUDE_PYTHON_AST_H_
#include "third_party/python/Include/asdl.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/* clang-format off */
/* File automatically generated by Parser/asdl_c.py. */
typedef str... | 22,642 | 646 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/namespaceobject.h | #ifndef NAMESPACEOBJECT_H
#define NAMESPACEOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#ifndef Py_LIMITED_API
extern PyTypeObject _PyNamespace_Type;
PyObject * _PyNamespace_New(PyObject *kwds);
#endif /* !Py_LIMITED_API */
COSMOPOLITAN_C_END_
#endif /* !NAMESP... | 335 | 15 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/Python.h | #ifndef Py_PYTHON_H
#define Py_PYTHON_H
/* clang-format off */
/*
* PYTHON DIAMOND DEPENDENCY HEADER
*
* If your editor isn't able to automatically insert #include lines,
* then this header can make development easier. It's also great for
* making beginner's tutorials simpler and more attractive.
*
* However... | 4,043 | 90 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/opcode.h | #ifndef Py_OPCODE_H
#define Py_OPCODE_H
#include "third_party/python/Include/op.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* Auto-generated by Tools/scripts/generate_opcode_h.py */
/* Instruction opcodes for compiled code */
#define POP_TOP 1
#define ROT_TWO 2
#define ROT_THRE... | 5,180 | 145 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/asdl.h | #ifndef Py_ASDL_H
#define Py_ASDL_H
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/pyarena.h"
/* clang-format off */
typedef PyObject * identifier;
typedef PyObject * string;
typedef PyObject * bytes;
typedef PyObject * object;
typedef PyObject * singleton;
typedef PyObject * const... | 1,331 | 50 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/code.h | #ifndef Py_LIMITED_API
#ifndef Py_CODE_H
#define Py_CODE_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
typedef uint16_t _Py_CODEUNIT;
#ifdef WORDS_BIGENDIAN
#define _Py_OPCODE(word) ((word) >> 8)
#define _Py_OPARG(word) ((word)&255)
#else
#define _Py_OPCODE(word) ((word)&255)
#define _Py_OPA... | 5,859 | 147 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/abstract.h | #ifndef Py_ABSTRACTOBJECT_H
#define Py_ABSTRACTOBJECT_H
#include "third_party/python/Include/listobject.h"
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/tupleobject.h"
COSMOPOLITAN_C_START_
/* Abstract Object Interface (many thanks to Jim Fulton) */
#define PyObject_DelAttrString... | 29,860 | 1,037 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/symtable.h | #ifndef Py_LIMITED_API
#ifndef Py_SYMTABLE_H
#define Py_SYMTABLE_H
#include "third_party/python/Include/Python-ast.h"
#include "third_party/python/Include/compile.h"
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
typedef enum _block_type { FunctionBlock, ClassBlock, ModuleB... | 4,963 | 115 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pgen.h | #ifndef Py_PGEN_H
#define Py_PGEN_H
#include "third_party/python/Include/grammar.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* Parser generator interface */
extern grammar *meta_grammar(void);
struct _node;
extern grammar *pgen(struct _node *);
COSMOPOLITAN_C_END_
#endif /* !Py_PGEN_H */
| 298 | 16 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/codecs.h | #ifndef Py_CODECREGISTRY_H
#define Py_CODECREGISTRY_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* ------------------------------------------------------------------------
Python Codec Registry and support functions
Written by Marc-Andre Lemburg (mal@lemburg.com)... | 6,533 | 239 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pystrtod.h | #ifndef Py_STRTOD_H
#define Py_STRTOD_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
double PyOS_string_to_double(const char *str,
char **endptr,
PyObject *overflow_exception);
/* The calle... | 1,477 | 41 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/patchlevel.h | /* clang-format off */
/* Python version identification scheme.
When the major or minor version changes, the VERSION variable in
configure.ac must also be changed.
There is also (independent) API version information in modsupport.h.
*/
/* Values for PY_RELEASE_LEVEL */
#define PY_RELEASE_LEVEL_ALPHA 0xA
#d... | 1,154 | 37 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/methodobject.h | #ifndef Py_METHODOBJECT_H
#define Py_METHODOBJECT_H
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/pyport.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* This is about the type 'builtin_function_or_method',
not Python methods in user-defined classes. See classobject.h
for... | 4,224 | 123 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/errcode.h | #ifndef Py_ERRCODE_H
#define Py_ERRCODE_H
COSMOPOLITAN_C_START_
/* clang-format off */
/* Error codes passed around between file input, tokenizer, parser and
interpreter. This is necessary so we can turn them into Python
exceptions at a higher level. Note that some errors have a
slightly different meaning ... | 1,495 | 36 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pystrcmp.h | #ifndef Py_STRCMP_H
#define Py_STRCMP_H
#include "third_party/python/Include/pyport.h"
COSMOPOLITAN_C_START_
/* clang-format off */
int PyOS_mystrnicmp(const char *, const char *, Py_ssize_t);
int PyOS_mystricmp(const char *, const char *);
#ifdef MS_WINDOWS
#define PyOS_strnicmp strnicmp
#define PyOS_stricmp stricmp... | 455 | 20 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pycapsule.h | #ifndef Py_CAPSULE_H
#define Py_CAPSULE_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* Capsule objects let you wrap a C "void *" pointer in a Python
object. They're a way of passing data through the Python interpreter
without creating your own custom type.
C... | 1,632 | 56 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/cellobject.h | #ifndef Py_LIMITED_API
#ifndef Py_CELLOBJECT_H
#define Py_CELLOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
typedef struct {
PyObject_HEAD
PyObject *ob_ref; /* Content of the cell or NULL when empty */
} PyCellObject;
extern PyTypeObject PyCell_Type;
#define P... | 677 | 27 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/op.h | #ifndef COSMOPOLITAN_THIRD_PARTY_PYTHON_INCLUDE_OP_H_
#define COSMOPOLITAN_THIRD_PARTY_PYTHON_INCLUDE_OP_H_
/* Rich comparison opcodes */
#define Py_LT 0
#define Py_LE 1
#define Py_EQ 2
#define Py_NE 3
#define Py_GT 4
#define Py_GE 5
#endif /* COSMOPOLITAN_THIRD_PARTY_PYTHON_INCLUDE_OP_H_ */
| 295 | 13 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/sysmodule.h | #ifndef Py_SYSMODULE_H
#define Py_SYSMODULE_H
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/pyport.h"
COSMOPOLITAN_C_START_
/* clang-format off */
PyObject * PySys_GetObject(const char *);
int PySys_SetObject(const char *, PyObject *);
#ifndef Py_LIMITED_API
PyObject * _PySys_GetO... | 970 | 33 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/enumobject.h | #ifndef Py_ENUMOBJECT_H
#define Py_ENUMOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
extern PyTypeObject PyEnum_Type;
extern PyTypeObject PyReversed_Type;
COSMOPOLITAN_C_END_
#endif /* !Py_ENUMOBJECT_H */
| 262 | 12 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/fileobject.h | #ifndef Py_FILEOBJECT_H
#define Py_FILEOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#define PY_STDIOTEXTMODE "b"
PyObject * PyFile_FromFd(int, const char *, const char *, int,
const char *, const char *,
... | 1,530 | 47 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/modsupport.h | #ifndef Py_MODSUPPORT_H
#define Py_MODSUPPORT_H
#include "third_party/python/Include/methodobject.h"
#include "third_party/python/Include/moduleobject.h"
#include "third_party/python/Include/object.h"
#pragma GCC diagnostic ignored "-Wredundant-decls"
COSMOPOLITAN_C_START_
/* clang-format off */
/* If PY_SSIZE_T_CLEAN... | 8,143 | 205 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/weakrefobject.h | #ifndef Py_WEAKREFOBJECT_H
#define Py_WEAKREFOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
typedef struct _PyWeakReference PyWeakReference;
/* PyWeakReference is the base struct for the Python ReferenceType, ProxyType,
* and CallableProxyType.
*/
#ifndef Py_LIM... | 2,791 | 81 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/genobject.h | #ifndef Py_LIMITED_API
#ifndef Py_GENOBJECT_H
#define Py_GENOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
struct _frame; /* Avoid including frameobject.h */
/* _PyGenObject_HEAD defines the initial segment of generator
and coroutine objects. */
#define _PyGenO... | 3,445 | 100 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/structmember.h | #ifndef Py_STRUCTMEMBER_H
#define Py_STRUCTMEMBER_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* Interface to map C struct members to Python object attributes */
/* An array of PyMemberDef structures defines the name, type and offset
of selected members of a C stru... | 1,996 | 68 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/bltinmodule.h | #ifndef Py_BLTINMODULE_H
#define Py_BLTINMODULE_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
extern PyTypeObject PyFilter_Type;
extern PyTypeObject PyMap_Type;
extern PyTypeObject PyZip_Type;
COSMOPOLITAN_C_END_
#endif /* !Py_BLTINMODULE_H */
| 294 | 13 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pymath.h | #ifndef Py_PYMATH_H
#define Py_PYMATH_H
#include "libc/math.h"
#include "third_party/python/pyconfig.h"
/* clang-format off */
/**************************************************************************
Symbols and macros to supply platform-independent interfaces to mathematical
functions and constants
***************... | 8,100 | 237 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pyerrors.h | #ifndef Py_ERRORS_H
#define Py_ERRORS_H
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/unicodeobject.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#ifndef Py_LIMITED_API
/* PyException_HEAD defines the initial segment of every exception class. */
#define PyException_HEAD PyObject... | 15,404 | 486 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/traceback.h | #ifndef Py_TRACEBACK_H
#define Py_TRACEBACK_H
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/pystate.h"
COSMOPOLITAN_C_START_
/* clang-format off */
struct _frame;
/* Traceback interface */
#ifndef Py_LIMITED_API
typedef struct _traceback {
PyObject_HEAD
struct _traceback ... | 3,600 | 115 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/yoink.h | #ifndef COSMOPOLITAN_THIRD_PARTY_PYTHON_INCLUDE_YOINK_H_
#define COSMOPOLITAN_THIRD_PARTY_PYTHON_INCLUDE_YOINK_H_
#ifdef __x86_64__
#define PYTHON_YOINK(s) \
__asm__(".section .yoink\n\t" \
"nopl\t\"pyc:" s "\"\n\t" \
".previous")
#elif defined(__aarch64__)
#define PYTHON_YOINK(s)... | 739 | 25 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/osmodule.h | #ifndef Py_OSMODULE_H
#define Py_OSMODULE_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
PyObject * PyOS_FSPath(PyObject *path);
#endif
COSMOPOLITAN_C_END_
#endif /* !Py_OSMODULE_H */
| 296 | 13 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/iterobject.h | #ifndef Py_ITEROBJECT_H
#define Py_ITEROBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
extern PyTypeObject PySeqIter_Type;
extern PyTypeObject PyCallIter_Type;
extern PyTypeObject PyCmpWrapper_Type;
#define PySeqIter_Check(op) (Py_TYPE(op) == &PySeqIter_Type)
PyOb... | 523 | 23 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pystrhex.h | #ifndef Py_STRHEX_H
#define Py_STRHEX_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#ifndef Py_LIMITED_API
/* Returns a str() containing the hex representation of argbuf. */
PyObject* _Py_strhex(const char* argbuf, const Py_ssize_t arglen);
/* Returns a bytes() containin... | 514 | 16 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/sliceobject.h | #ifndef Py_SLICEOBJECT_H
#define Py_SLICEOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* The unique ellipsis object "..." */
extern PyObject _Py_EllipsisObject; /* Don't use this directly */
#define Py_Ellipsis (&_Py_EllipsisObject)
/* Slice object interface *... | 2,431 | 64 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/ast.h | #ifndef Py_AST_H
#define Py_AST_H
#include "third_party/python/Include/Python-ast.h"
#include "third_party/python/Include/node.h"
#include "third_party/python/Include/pythonrun.h"
COSMOPOLITAN_C_START_
/* clang-format off */
extern int foo;
int PyAST_Validate(mod_ty);
mod_ty PyAST_FromNode(
const node *n,
PyCo... | 601 | 24 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/frameobject.h | #ifndef Py_LIMITED_API
#ifndef Py_FRAMEOBJECT_H
#define Py_FRAMEOBJECT_H
#include "third_party/python/Include/code.h"
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/pystate.h"
COSMOPOLITAN_C_START_
/* clang-format off */
typedef struct {
int b_type; /* what kind... | 3,655 | 96 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pyfpe.h | #ifndef Py_PYFPE_H
#define Py_PYFPE_H
COSMOPOLITAN_C_START_
/* clang-format off */
#ifdef WANT_SIGFPE_HANDLER
extern jmp_buf PyFPE_jbuf;
extern int PyFPE_counter;
extern double PyFPE_dummy(void *);
#define PyFPE_START_PROTECT(err_string, leave_stmt) \
if (!PyFPE_counter++ && setjmp(PyFPE_jbuf)) { \
PyErr_SetString(PyE... | 606 | 22 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/odictobject.h | #ifndef Py_ODICTOBJECT_H
#define Py_ODICTOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* OrderedDict */
/* This API is optional and mostly redundant. */
#ifndef Py_LIMITED_API
typedef struct _odictobject PyODictObject;
extern PyTypeObject PyODict_Type;
extern ... | 1,271 | 41 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pygetopt.h | #ifndef Py_PYGETOPT_H
#define Py_PYGETOPT_H
COSMOPOLITAN_C_START_
/* clang-format off */
#ifndef Py_LIMITED_API
extern int _PyOS_opterr;
extern int _PyOS_optind;
extern wchar_t * _PyOS_optarg;
void _PyOS_ResetGetOpt(void);
int _PyOS_GetOpt(int argc, wchar_t **argv, wchar_t *optstring);
#endif /* !Py_LIMITED_API */
... | 368 | 18 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/bitset.h | #ifndef Py_BITSET_H
#define Py_BITSET_H
#include "third_party/python/Include/pgenheaders.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#define BYTE char
typedef BYTE *bitset;
bitset newbitset(int nbits);
void delbitset(bitset bs);
#define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0)
int addbit... | 817 | 28 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pydtrace.h | #ifndef Py_DTRACE_H
#define Py_DTRACE_H
COSMOPOLITAN_C_START_
#define PyDTrace_LINE(arg0, arg1, arg2)
#define PyDTrace_FUNCTION_ENTRY(arg0, arg1, arg2)
#define PyDTrace_FUNCTION_RETURN(arg0, arg1, arg2)
#define PyDTrace_GC_START(arg0)
#define PyDTrace_GC_DONE(arg0)
#define PyDTrace_INSTANCE_NEW_START(arg0)
#define PyD... | 946 | 27 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/datetime.h | #ifndef Py_LIMITED_API
#ifndef DATETIME_H
#define DATETIME_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* Fields are packed into successive bytes, each viewed as unsigned and
* big-endian, unless otherwise noted:
*
* byte offset
* 0 year 2 bytes, 1-9... | 9,440 | 257 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pymem.h | #ifndef Py_PYMEM_H
#define Py_PYMEM_H
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/pyport.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
* PYMALLOC_DEBUG is in error if pymalloc is not in use.
*/
#if defined(Py_DEBUG) ... | 8,873 | 247 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pythonrun.h | #ifndef Py_PYTHONRUN_H
#define Py_PYTHONRUN_H
#include "third_party/python/Include/code.h"
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/pyarena.h"
#include "third_party/python/Include/pystate.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#define PyCF_MASK (CO_FUTURE_DIVISION | ... | 6,579 | 196 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/memoryobject.h | #ifndef Py_MEMORYOBJECT_H
#define Py_MEMORYOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#ifndef Py_LIMITED_API
extern PyTypeObject _PyManagedBuffer_Type;
#endif
extern PyTypeObject PyMemoryView_Type;
#define PyMemoryView_Check(op) (Py_TYPE(op) == &PyMemoryView_T... | 2,680 | 69 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/parsetok.h | #ifndef Py_LIMITED_API
#ifndef Py_PARSETOK_H
#define Py_PARSETOK_H
#include "third_party/python/Include/grammar.h"
#include "third_party/python/Include/node.h"
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
typedef struct {
int error;
#ifndef PGEN
/* The filename is... | 2,852 | 107 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/bytesobject.h | #ifndef Py_BYTESOBJECT_H
#define Py_BYTESOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/*
Type PyBytesObject represents a character string. An extra zero byte is
reserved at the end to ensure it is zero-terminated, but a size is
present so strings with null bytes... | 8,025 | 218 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pyatomic.h | #ifndef Py_ATOMIC_H
#define Py_ATOMIC_H
#include "libc/assert.h"
#include "third_party/python/Include/dynamic_annotations.h"
#include "third_party/python/pyconfig.h"
/* clang-format off */
/* This is modeled after the atomics interface from C1x, according to
* the draft at
* http://www.open-std.org/JTC1/SC22/wg14/ww... | 8,111 | 245 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/tupleobject.h | #ifndef Py_TUPLEOBJECT_H
#define Py_TUPLEOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/*
Another generally useful object type is a tuple of object pointers.
For Python, this is an immutable type. C code can change the tuple items
(but not their number), and even... | 2,322 | 69 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/funcobject.h | #ifndef Py_LIMITED_API
#ifndef Py_FUNCOBJECT_H
#define Py_FUNCOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* Function objects and code objects should not be confused with each other:
*
* Function objects are created by the execution of the 'def' statement.
* ... | 3,872 | 100 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/marshal.h | #ifndef Py_MARSHAL_H
#define Py_MARSHAL_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#define Py_MARSHAL_VERSION 4
void PyMarshal_WriteLongToFile(long, FILE *, int);
void PyMarshal_WriteObjectToFile(PyObject *, FILE *, int);
PyObject * PyMarshal_WriteObjectToString(PyOb... | 666 | 23 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pystate.h | #ifndef Py_PYSTATE_H
#define Py_PYSTATE_H
#include "third_party/python/Include/moduleobject.h"
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/pyatomic.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* This limitation is for performance and simplicity. If needed it can be
removed (... | 10,947 | 324 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/dictobject.h | #ifndef Py_DICTOBJECT_H
#define Py_DICTOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* Dictionary object type -- mapping from hashable object to object */
/* The distribution includes a separate file, Objects/dictnotes.txt,
describing explorations into dictio... | 6,805 | 176 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/grammar.h | #ifndef Py_GRAMMAR_H
#define Py_GRAMMAR_H
#include "libc/stdio/stdio.h"
#include "third_party/python/Include/bitset.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* A label of an arc */
typedef struct {
int lb_type;
char *lb_str;
} label;
#define EMPTY 0 /* Label number 0 is by definition the empty label... | 2,122 | 79 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/py_curses.h | #ifndef Py_CURSES_H
#define Py_CURSES_H
#include "third_party/python/Include/object.h"
/* clang-format off */
#if !defined(HAVE_CURSES_IS_PAD) && defined(WINDOW_HAS_FLAGS)
/* The following definition is necessary for ncurses 5.7; without it,
some of [n]curses.h set NCURSES_OPAQUE to 1, and then Python
can't get ... | 3,604 | 130 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/eval.h | #ifndef Py_EVAL_H
#define Py_EVAL_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
PyObject * PyEval_EvalCode(PyObject *, PyObject *, PyObject *);
PyObject * PyEval_EvalCodeEx(PyObject *co,
PyObject *globals,
PyObject *locals,
PyObject **args, int argc,
... | 905 | 33 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/setobject.h | #ifndef Py_SETOBJECT_H
#define Py_SETOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#ifndef Py_LIMITED_API
/* There are three kinds of entries in the table:
1. Unused: key == NULL and hash == 0
2. Dummy: key == dummy and hash == -1
3. Active: key != NULL and ... | 3,198 | 105 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/node.h | #ifndef Py_NODE_H
#define Py_NODE_H
#include "third_party/python/Include/pyport.h"
COSMOPOLITAN_C_START_
/* clang-format off */
typedef struct _node {
short n_type;
char *n_str;
int n_lineno;
int n_col_offset;
int n_nchildren;
struct _node *n_child;
} node;
node * PyNode_New(int type);... | 958 | 40 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/typeslots.h | /* clang-format off */
/* Do not renumber the file; these numbers are part of the stable ABI. */
/* Disabled, see #10181 */
#undef Py_bf_getbuffer
#undef Py_bf_releasebuffer
#define Py_mp_ass_subscript 3
#define Py_mp_length 4
#define Py_mp_subscript 5
#define Py_nb_absolute 6
#define Py_nb_add 7
#define Py_nb_and 8
#d... | 2,276 | 87 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/ezprint.h | #ifndef COSMOPOLITAN_THIRD_PARTY_PYTHON_INCLUDE_EZPRINT_H_
#define COSMOPOLITAN_THIRD_PARTY_PYTHON_INCLUDE_EZPRINT_H_
#include "libc/calls/calls.h"
#include "libc/intrin/kprintf.h"
#include "third_party/python/Include/abstract.h"
#include "third_party/python/Include/bytesobject.h"
#include "third_party/python/Include/p... | 1,143 | 39 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/cosmo.h | #ifndef Py_COSMO_H
#define Py_COSMO_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
PyMODINIT_FUNC PyInit_cosmo(void);
COSMOPOLITAN_C_END_
#endif /* !Py_IMPORT_H */
| 190 | 10 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pyctype.h | #ifndef Py_LIMITED_API
#ifndef PYCTYPE_H
#define PYCTYPE_H
#include "libc/str/tab.internal.h"
#define Py_TOLOWER(c) kToLower[255 & (c)]
#define Py_TOUPPER(c) kToUpper[255 & (c)]
#define Py_ISDIGIT(C) \
({ \
unsigned char c_ = (C); \
'0' <= c_&& c_ <= '9'; \
})
#define Py_ISL... | 1,885 | 56 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pyhash.h | #ifndef Py_HASH_H
#define Py_HASH_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* Helpers for hash functions */
#ifndef Py_LIMITED_API
Py_hash_t _Py_HashDouble(double);
Py_hash_t _Py_HashPointer(void*);
Py_hash_t _Py_HashBytes(const void*, Py_ssize_t);
#endif
/* Prime ... | 4,125 | 143 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/accu.h | #ifndef Py_LIMITED_API
#ifndef Py_ACCU_H
#define Py_ACCU_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#undef small /* defined by some Windows headers */
typedef struct {
PyObject *large; /* A list of previously accumulated large strings */
PyObject *small; /*... | 643 | 24 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/longobject.h | #ifndef Py_LONGOBJECT_H
#define Py_LONGOBJECT_H
#include "third_party/python/Include/bytesobject.h"
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/unicodeobject.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* Long (arbitrary precision) integer object interface */
typedef struct... | 8,137 | 215 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/graminit.h | /* clang-format off */
/* Generated by Parser/pgen */
#define single_input 256
#define file_input 257
#define eval_input 258
#define decorator 259
#define decorators 260
#define decorated 261
#define async_funcdef 262
#define funcdef 263
#define parameters 264
#define typedargslist 265
#define tfpdef 266
#define varar... | 1,989 | 90 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/bytearrayobject.h | #ifndef Py_BYTEARRAYOBJECT_H
#define Py_BYTEARRAYOBJECT_H
#include "libc/assert.h"
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* Type PyByteArrayObject represents a mutable array of bytes.
* The Python API is that of a sequence;
* the bytes are mapped to ints in [0, 2... | 2,042 | 58 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/complexobject.h | #ifndef Py_COMPLEXOBJECT_H
#define Py_COMPLEXOBJECT_H
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/unicodeobject.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#ifndef Py_LIMITED_API
typedef struct {
double real;
double imag;
} Py_complex;
/* Operations on complex numbe... | 1,713 | 67 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/dynamic_annotations.h | #ifndef __DYNAMIC_ANNOTATIONS_H__
#define __DYNAMIC_ANNOTATIONS_H__
#ifndef DYNAMIC_ANNOTATIONS_ENABLED
#define DYNAMIC_ANNOTATIONS_ENABLED 0
#endif
#if DYNAMIC_ANNOTATIONS_ENABLED != 0
/* clang-format off */
/* Copyright (c) 2008-2009, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and bin... | 21,772 | 486 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/warnings.h | #ifndef Py_WARNINGS_H
#define Py_WARNINGS_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
#ifndef Py_LIMITED_API
PyObject *_PyWarnings_Init(void);
#endif
int PyErr_WarnEx(PyObject *, const char *, Py_ssize_t);
int PyErr_WarnFormat(PyObject *, Py_ssize_t, const char *, ...);
#if !defined(Py_LIM... | 1,028 | 36 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/intrcheck.h | #ifndef Py_INTRCHECK_H
#define Py_INTRCHECK_H
COSMOPOLITAN_C_START_
/* clang-format off */
int PyOS_InterruptOccurred(void);
void PyOS_InitInterrupts(void);
void PyOS_AfterFork(void);
#ifndef Py_LIMITED_API
int _PyOS_IsMainThread(void);
#ifdef MS_WINDOWS
/* windows.h is not included by Python.h so use void* instead ... | 450 | 21 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/floatobject.h | #ifndef Py_FLOATOBJECT_H
#define Py_FLOATOBJECT_H
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/unicodeobject.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#ifndef Py_LIMITED_API
typedef struct {
PyObject_HEAD
double ob_fval;
} PyFloatObject;
#endif
extern PyTypeObject ... | 4,565 | 123 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/unicodeobject.h | #ifndef Py_UNICODEOBJECT_H
#define Py_UNICODEOBJECT_H
#include "libc/assert.h"
#include "third_party/python/Include/object.h"
#include "third_party/python/pyconfig.h"
COSMOPOLITAN_C_START_
/* clang-format off */
#define Py_USING_UNICODE
#ifndef SIZEOF_WCHAR_T
#error Must define SIZEOF_WCHAR_T
#endif
#define Py_UNICO... | 74,472 | 2,200 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/classobject.h | #ifndef Py_LIMITED_API
#ifndef Py_CLASSOBJECT_H
#define Py_CLASSOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
typedef struct {
PyObject_HEAD
PyObject *im_func; /* The callable object implementing the method */
PyObject *im_self; /* The instance it ... | 1,501 | 53 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pythread.h | #ifndef Py_PYTHREAD_H
#define Py_PYTHREAD_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
typedef void *PyThread_type_lock;
typedef void *PyThread_type_sema;
/* Return status codes for Python lock acquisition. Chosen for maximum
* backwards compatibility, ie failure -> ... | 2,818 | 86 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/descrobject.h | #ifndef Py_DESCROBJECT_H
#define Py_DESCROBJECT_H
#include "third_party/python/Include/methodobject.h"
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/pyport.h"
COSMOPOLITAN_C_START_
/* clang-format off */
typedef PyObject *(*getter)(PyObject *, void *);
typedef int (*setter)(PyObje... | 3,101 | 109 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/structseq.h | #ifndef Py_STRUCTSEQ_H
#define Py_STRUCTSEQ_H
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/tupleobject.h"
COSMOPOLITAN_C_START_
/* clang-format off */
typedef struct PyStructSequence_Field {
char *name;
char *doc;
} PyStructSequence_Field;
typedef struct PyStructSequence... | 1,341 | 46 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/object.h | #ifndef Py_OBJECT_H
#define Py_OBJECT_H /* DO NOT INCLUDE pystate.h */
#include "libc/stdio/stdio.h"
#include "third_party/python/Include/op.h"
#include "third_party/python/Include/pyport.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/* Object and type object interface */
/*
Objects are structures allocated on the ... | 39,427 | 1,070 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/rangeobject.h | #ifndef Py_RANGEOBJECT_H
#define Py_RANGEOBJECT_H
#include "third_party/python/Include/object.h"
COSMOPOLITAN_C_START_
/* clang-format off */
/*
A range object represents an integer range. This is an immutable object;
a range cannot change its value after creation.
Range objects behave like the corresponding tuple o... | 628 | 23 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/osdefs.h | #ifndef Py_OSDEFS_H
#define Py_OSDEFS_H
COSMOPOLITAN_C_START_
#ifdef MS_WINDOWS
#define SEP L'\\'
#define ALTSEP L'/'
#define MAXPATHLEN 256
#define DELIM L';'
#endif
/* Filename separator */
#ifndef SEP
#define SEP L'/'
#endif
#ifndef MAXPATHLEN
#if defined(PATH_MAX) && PATH_MAX > 1024
#define MAXPA... | 501 | 32 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/pymacro.h | #ifndef Py_PYMACRO_H
#define Py_PYMACRO_H
/* clang-format off */
/* Minimum value between x and y */
#define Py_MIN(x, y) (((x) > (y)) ? (y) : (x))
/* Maximum value between x and y */
#define Py_MAX(x, y) (((x) > (y)) ? (x) : (y))
/* Absolute value of the number x */
#define Py_ABS(x) ((x) < 0 ? -(x) : (x))
#define... | 3,523 | 100 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/bytes_methods.h | #ifndef Py_LIMITED_API
#ifndef Py_BYTES_CTYPE_H
#define Py_BYTES_CTYPE_H
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/pymacro.h"
/* clang-format off */
/*
* The internal implementation behind PyBytes (bytes) and PyByteArray (bytearray)
* methods of the given names, they operate... | 3,309 | 71 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Include/ceval.h | #ifndef Py_CEVAL_H
#define Py_CEVAL_H
#include "libc/dce.h"
#include "libc/intrin/likely.h"
#include "libc/runtime/stack.h"
#include "third_party/python/Include/object.h"
#include "third_party/python/Include/pyerrors.h"
#include "third_party/python/Include/pystate.h"
#include "third_party/python/Include/pythonrun.h"
CO... | 9,297 | 256 | jart/cosmopolitan | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.