// education

CPython C-API 아키텍처: PyObject 헤더 구조와 PyTypeObject 타입 객체

CPython 인터프리터 내부에서 파이썬의 모든 동적 객체를 C 언어로 표현하는 근간 구조체인 **PyObject**와 객체의 행동 양식을 규정하는 **PyTypeObject**를 배웁니다.


1. CPython C-API 아키텍처 용어 사전 (Glossary)


2. CPython C 구조체 핵심 정의 (C-API Source)

typedef struct _object {
    _PyObject_HEAD_EXTRA
    Py_ssize_t ob_refcnt;
    struct _typeobject *ob_type;
} PyObject;
← 이전파이썬 압축 파일 포맷 및 아카이브: zipfile, tarfile 및 zlib 스트림 압축 다음 →CPython 참조 카운팅(Reference Counting)과 C 메모리 관리 (Py_INCREF, Py_DECREF, PyMem_Malloc)