Python/C API 參考手冊
*********************

對於想要編寫擴充模組或是嵌入 Python 的 C 和 C++ 程式設計師們，這份手冊
記錄了可使用的 API（應用程式介面）。在擴充和嵌入 Python 直譯器中也有相
關的內容，它描述了編寫擴充的一般原則，但並沒有詳細說明 API 函式。

* 簡介

  * 編寫標準

  * 引入檔案 (include files)

  * 有用的巨集

  * 物件、型別和參照計數

  * 例外

  * 嵌入式Python

  * 除錯建置

* C API 穩定性

  * 穩定的應用程式二進位介面

  * 平台注意事項

  * 受限 API 的內容

* The Very High Level Layer

* 參照計數

* 例外處理

  * Printing and clearing

  * Raising exceptions

  * Issuing warnings

  * Querying the error indicator

  * Signal Handling

  * 例外類別

  * 例外物件

  * Unicode Exception Objects

  * Recursion Control

  * Standard Exceptions

  * Standard Warning Categories

* 工具

  * 作業系統工具

  * 系統函式

  * 行程（Process）控制

  * 引入模組

  * Data marshalling support

  * 剖析引數與建置數值

  * 字串轉換與格式化

  * PyHash API

  * Reflection

  * Codec registry and support functions

* 抽象物件層 (Abstract Objects Layer)

  * Object Protocol

  * 呼叫協定 (Call Protocol)

  * Number Protocol

  * Sequence Protocol

  * Mapping Protocol

  * 疊代器協議

  * 緩衝協定 (Buffer Protocol)

  * 舊式緩衝協定 (Buffer Protocol)

* 具體物件層

  * 基礎物件

  * 數值物件

  * 序列物件

  * 容器物件

  * 函式物件

  * 其他物件

* Initialization, Finalization, and Threads

  * Before Python Initialization

  * Global configuration variables

  * Initializing and finalizing the interpreter

  * Process-wide parameters

  * Thread State and the Global Interpreter Lock

  * Sub-interpreter support

  * Asynchronous Notifications

  * Profiling and Tracing

  * Advanced Debugger Support

  * Thread Local Storage Support

* Python Initialization Configuration

  * 範例

  * PyWideStringList

  * PyStatus

  * PyPreConfig

  * Preinitialize Python with PyPreConfig

  * PyConfig

  * Initialization with PyConfig

  * Isolated Configuration

  * Python Configuration

  * Python Path Configuration

  * Py_RunMain()

  * Py_GetArgcArgv()

  * Multi-Phase Initialization Private Provisional API

* 記憶體管理

  * 總覽

  * Allocator Domains

  * Raw Memory Interface

  * Memory Interface

  * Object allocators

  * Default Memory Allocators

  * Customize Memory Allocators

  * Debug hooks on the Python memory allocators

  * The pymalloc allocator

  * tracemalloc C API

  * 範例

* Object Implementation Support

  * 在 heap 上分配物件

  * 通用物件結構

  * 型別物件

  * Number Object Structures

  * Mapping Object Structures

  * Sequence Object Structures

  * Buffer Object Structures

  * Async Object Structures

  * Slot Type typedefs

  * 範例

  * Supporting Cyclic Garbage Collection

* API 和 ABI 版本管理
