1// PyHead.h -- 2// $Id: PyHead.h 1230 2007-03-09 15:58:53Z jcw $ 3// This is part of MetaKit, see http://www.equi4.com/metakit.html 4// Copyright (C) 1999-2004 Gordon McMillan and Jean-Claude Wippler. 5// 6// Common object header class 7 8#if !defined INCLUDE_PYHEAD_H 9#define INCLUDE_PYHEAD_H 10 11#include <Python.h> 12 13class PyHead: public PyObject { 14 public: 15 PyHead(PyTypeObject &t) { 16#ifdef Py_TRACE_REFS 17 _ob_next = 0; 18 _ob_prev = 0; 19 _Py_AddToAllObjects(this, 0); 20#endif 21 ob_refcnt = 1; 22 ob_type = &t; 23 } 24}; 25 26#endif 27