Commit f6adac3d authored by Jim Fulton's avatar Jim Fulton

Moved INSTANCE_DICT macro to public interface.

parent 2613cb01
/*
$Id: ExtensionClass.c,v 1.7 1997/02/24 23:17:47 jim Exp $
$Id: ExtensionClass.c,v 1.8 1997/03/08 12:44:31 jim Exp $
Extension Class
......@@ -56,6 +56,9 @@
(540) 371-6909
$Log: ExtensionClass.c,v $
Revision 1.8 1997/03/08 12:44:31 jim
Moved INSTANCE_DICT macro to public interface.
Revision 1.7 1997/02/24 23:17:47 jim
Fixed bug in subclass_nonzero.
......@@ -97,7 +100,7 @@ static char ExtensionClass_module_documentation[] =
" - They provide access to unbound methods,\n"
" - They can be called to create instances.\n"
"\n"
"$Id: ExtensionClass.c,v 1.7 1997/02/24 23:17:47 jim Exp $\n"
"$Id: ExtensionClass.c,v 1.8 1997/03/08 12:44:31 jim Exp $\n"
;
#include <stdio.h>
......@@ -115,9 +118,6 @@ PyVar_Assign(PyObject **v, PyObject *e)
#define UNLESS(E) if(!(E))
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E); UNLESS(V)
#define INSTANCE_DICT(inst) \
*(((PyObject**)inst) + (inst->ob_type->tp_basicsize/sizeof(PyObject*) - 1))
/* Declarations for objects of type ExtensionClass */
#include "ExtensionClass.h"
......@@ -2802,7 +2802,7 @@ void
initExtensionClass()
{
PyObject *m, *d;
char *rev="$Revision: 1.7 $";
char *rev="$Revision: 1.8 $";
PURE_MIXIN_CLASS(Base, "Minimalbase class for Extension Classes", NULL);
PMethodType.ob_type=&PyType_Type;
......
/*
$Id: ExtensionClass.h,v 1.4 1997/02/17 16:26:59 jim Exp $
$Id: ExtensionClass.h,v 1.5 1997/03/08 12:44:13 jim Exp $
Extension Class Definitions
......@@ -113,6 +113,9 @@
$Log: ExtensionClass.h,v $
Revision 1.5 1997/03/08 12:44:13 jim
Moved INSTANCE_DICT macro to public interface.
Revision 1.4 1997/02/17 16:26:59 jim
Many changes in access to CAPI.
......@@ -350,6 +353,9 @@ static PyExtensionClass NAME ## Type = { PyObject_HEAD_INIT(NULL) \
(((PyExtensionClass*)((O)->ob_type))->class_flags & \
EXTENSIONCLASS_BINDABLE_FLAG))
/* Get an object's instance dictionary. Use with caution */
#define INSTANCE_DICT(inst) \
*(((PyObject**)inst) + (inst->ob_type->tp_basicsize/sizeof(PyObject*) - 1))
/*****************************************************************************
......
/*
$Id: ExtensionClass.c,v 1.7 1997/02/24 23:17:47 jim Exp $
$Id: ExtensionClass.c,v 1.8 1997/03/08 12:44:31 jim Exp $
Extension Class
......@@ -56,6 +56,9 @@
(540) 371-6909
$Log: ExtensionClass.c,v $
Revision 1.8 1997/03/08 12:44:31 jim
Moved INSTANCE_DICT macro to public interface.
Revision 1.7 1997/02/24 23:17:47 jim
Fixed bug in subclass_nonzero.
......@@ -97,7 +100,7 @@ static char ExtensionClass_module_documentation[] =
" - They provide access to unbound methods,\n"
" - They can be called to create instances.\n"
"\n"
"$Id: ExtensionClass.c,v 1.7 1997/02/24 23:17:47 jim Exp $\n"
"$Id: ExtensionClass.c,v 1.8 1997/03/08 12:44:31 jim Exp $\n"
;
#include <stdio.h>
......@@ -115,9 +118,6 @@ PyVar_Assign(PyObject **v, PyObject *e)
#define UNLESS(E) if(!(E))
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E); UNLESS(V)
#define INSTANCE_DICT(inst) \
*(((PyObject**)inst) + (inst->ob_type->tp_basicsize/sizeof(PyObject*) - 1))
/* Declarations for objects of type ExtensionClass */
#include "ExtensionClass.h"
......@@ -2802,7 +2802,7 @@ void
initExtensionClass()
{
PyObject *m, *d;
char *rev="$Revision: 1.7 $";
char *rev="$Revision: 1.8 $";
PURE_MIXIN_CLASS(Base, "Minimalbase class for Extension Classes", NULL);
PMethodType.ob_type=&PyType_Type;
......
/*
$Id: ExtensionClass.h,v 1.4 1997/02/17 16:26:59 jim Exp $
$Id: ExtensionClass.h,v 1.5 1997/03/08 12:44:13 jim Exp $
Extension Class Definitions
......@@ -113,6 +113,9 @@
$Log: ExtensionClass.h,v $
Revision 1.5 1997/03/08 12:44:13 jim
Moved INSTANCE_DICT macro to public interface.
Revision 1.4 1997/02/17 16:26:59 jim
Many changes in access to CAPI.
......@@ -350,6 +353,9 @@ static PyExtensionClass NAME ## Type = { PyObject_HEAD_INIT(NULL) \
(((PyExtensionClass*)((O)->ob_type))->class_flags & \
EXTENSIONCLASS_BINDABLE_FLAG))
/* Get an object's instance dictionary. Use with caution */
#define INSTANCE_DICT(inst) \
*(((PyObject**)inst) + (inst->ob_type->tp_basicsize/sizeof(PyObject*) - 1))
/*****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment