Python/C API reference manual
*****************************

이 설명서는 확장 모듈을 작성하거나 파이썬을 내장하고자 하는 C와 C++ 프
로그래머가 사용하는 API에 관해 설명합니다. 이 설명서와 쌍을 이루는 파
이썬 인터프리터 확장 및 내장 는 확장 제작의 일반 원칙을 설명하지만,
API 함수를 자세하게 설명하지는 않습니다.

* 소개

  * Language version compatibility

  * 코딩 표준

  * 인클루드 파일

  * 유용한 매크로들

  * 객체, 형 그리고 참조 횟수

  * 예외

  * 파이썬 임베딩하기

  * 디버깅 빌드

  * Recommended third party tools

* C API and ABI Stability

  * Unstable C API

  * Stable Application Binary Interfaces

  * Platform Considerations

  * ABI Checking

  * Contents of Limited API

* 매우 고수준 계층

  * Available start symbols

  * Stack Effects

* 참조 횟수

* 예외 처리

  * 인쇄와 지우기

  * 예외 발생시키기

  * 경고 발행하기

  * 에러 표시기 조회하기

  * 시그널 처리하기

  * 예외 클래스

  * 예외 객체

  * 유니코드 예외 객체

  * 재귀 제어

  * Exception and warning types

  * Tracebacks

* Defining extension modules

  * Extension export hook

  * Multi-phase initialization

  * Multiple module instances

  * "PyInit" function

* Definition slots

  * Convenience macros

  * Common slot IDs

* 유틸리티

  * 운영 체제 유틸리티

  * 시스템 함수

  * 프로세스 제어

  * 모듈 임포트 하기

  * 데이터 마샬링 지원

  * 인자 구문 분석과 값 구축

  * 문자열 변환과 포매팅

  * Character classification and conversion

  * PyHash API

  * 리플렉션

  * 코덱 등록소와 지원 함수

  * PyTime C API

  * Support for Perf Maps

* 추상 객체 계층

  * 객체 프로토콜

  * 호출 프로토콜

  * 숫자 프로토콜

  * 시퀀스 프로토콜

  * 매핑 프로토콜

  * 이터레이터 프로토콜

  * 버퍼 프로토콜

* 구상 객체 계층

  * 기본 객체

  * 숫자 객체

  * 시퀀스 객체

  * 컨테이너 객체

  * 함수 객체

  * 기타 객체

  * C API for extension modules

* Interpreter initialization and finalization

  * Before Python initialization

  * Global configuration variables

  * Initializing and finalizing the interpreter

  * Cautions regarding interpreter finalization

  * Interpreter views

  * Process-wide parameters

* Thread states and the global interpreter lock

  * Detaching the thread state from extension code

  * Using the C API from foreign threads

  * GIL-state APIs

  * Cautions about fork()

  * High-level APIs

  * Low-level APIs

* Asynchronous notifications

* Operating system thread APIs

* Synchronization primitives

  * Python critical section API

  * Legacy locking APIs

* Thread-local storage support

  * Thread-specific storage API

  * Dynamic allocation

  * Methods

  * Legacy APIs

* Multiple interpreters in a Python process

  * A per-interpreter GIL

  * Bugs and caveats

  * High-level APIs

  * Low-level APIs

  * Advanced debugger support

* Profiling and tracing

* Reference tracing

* 파이썬 초기화 구성

  * PyInitConfig C API

  * Configuration Options

  * Runtime Python configuration API

  * PyConfig C API

  * Py_GetArgcArgv()

  * Multi-Phase Initialization Private Provisional API

* 메모리 관리

  * 개요

  * Allocator Domains

  * 원시 메모리 인터페이스

  * 메모리 인터페이스

  * 객체 할당자

  * 기본 메모리 할당자

  * 메모리 할당자 사용자 정의

  * 파이썬 메모리 할당자의 디버그 훅

  * pymalloc 할당자

  * mimalloc 할당자

  * tracemalloc C API

  * 예

* 객체 구현 지원

  * Allocating objects on the heap

  * Object Life Cycle

  * 공통 객체 구조체

  * Type Object Structures

  * 순환 가비지 수집 지원

* API와 ABI 버전 붙이기

  * Build-time version constants

  * Run-time version

  * Bit-packing macros

* Monitoring C API

* Generating Execution Events

  * Managing the Monitoring State
