참조 횟수
*********

이 섹션의 매크로는 파이썬 객체의 참조 횟수를 관리하는 데 사용됩니다.

void Py_INCREF(PyObject *o)

   Increment the reference count for object *o*.  The object must not
   be "NULL"; if you aren't sure that it isn't "NULL", use
   "Py_XINCREF()".

void Py_XINCREF(PyObject *o)

   Increment the reference count for object *o*.  The object may be
   "NULL", in which case the macro has no effect.

void Py_DECREF(PyObject *o)

   Decrement the reference count for object *o*.  The object must not
   be "NULL"; if you aren't sure that it isn't "NULL", use
   "Py_XDECREF()".  If the reference count reaches zero, the object's
   type's deallocation function (which must not be "NULL") is invoked.

   경고:

     할당 해제 함수는 임의의 파이썬 코드가 호출되도록 할 수 있습니다 (
     예를 들어, "__del__()" 메서드가 있는 클래스 인스턴스가 할당 해제
     될 때). 이러한 코드에서의 예외는 전파되지 않지만, 실행된 코드는
     모든 파이썬 전역 변수에 자유롭게 액세스할 수 있습니다. 이것은
     "Py_DECREF()"가 호출되기 전에 전역 변수에서 도달할 수 있는 모든
     객체가 일관성 있는 상태에 있어야 함을 뜻합니다. 예를 들어, 리스트
     에서 객체를 삭제하는 코드는 삭제된 객체에 대한 참조를 임시 변수에
     복사하고, 리스트 데이터 구조를 갱신한 다음, 임시 변수에 대해
     "Py_DECREF()"를 호출해야 합니다.

void Py_XDECREF(PyObject *o)

   Decrement the reference count for object *o*.  The object may be
   "NULL", in which case the macro has no effect; otherwise the effect
   is the same as for "Py_DECREF()", and the same warning applies.

void Py_CLEAR(PyObject *o)

   Decrement the reference count for object *o*.  The object may be
   "NULL", in which case the macro has no effect; otherwise the effect
   is the same as for "Py_DECREF()", except that the argument is also
   set to "NULL".  The warning for "Py_DECREF()" does not apply with
   respect to the object passed because the macro carefully uses a
   temporary variable and sets the argument to "NULL" before
   decrementing its reference count.

   가비지 수집 중에 탐색 될 수 있는 변수의 값을 감소시킬 때마다 이 매
   크로를 사용하는 것이 좋습니다.

다음 함수는 파이썬의 실행 시간 동적 내장을 위한 것입니다:
"Py_IncRef(PyObject *o)", "Py_DecRef(PyObject *o)". 이것들은 단순히
"Py_XINCREF()"와 "Py_XDECREF()"의 노출된 함수 버전입니다.

다음 함수나 매크로는 인터프리터 코어에서만 사용할 수 있습니다:
"_Py_Dealloc()", "_Py_ForgetReference()", "_Py_NewReference()" 및 전역
변수 "_Py_RefTotal".
