Commit 065ee040 authored by Jim Fulton's avatar Jim Fulton

Updated to use new ExtensionClass destructor protocol.

parent 1c675814
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: ComputedAttribute.c,v 1.1 1999/03/10 15:20:23 jim Exp $ $Id: ComputedAttribute.c,v 1.2 1999/06/10 20:08:55 jim Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -79,6 +79,7 @@ static void ...@@ -79,6 +79,7 @@ static void
CA_dealloc(CA *self) CA_dealloc(CA *self)
{ {
Py_DECREF(self->callable); Py_DECREF(self->callable);
Py_DECREF(self->ob_type);
PyMem_DEL(self); PyMem_DEL(self);
} }
...@@ -123,7 +124,7 @@ void ...@@ -123,7 +124,7 @@ void
initComputedAttribute() initComputedAttribute()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.1 $"; char *rev="$Revision: 1.2 $";
UNLESS(ExtensionClassImported) return; UNLESS(ExtensionClassImported) return;
...@@ -133,7 +134,7 @@ initComputedAttribute() ...@@ -133,7 +134,7 @@ initComputedAttribute()
/* Create the module and add the functions */ /* Create the module and add the functions */
m = Py_InitModule4("ComputedAttribute", methods, m = Py_InitModule4("ComputedAttribute", methods,
"Provide Computed Attributes\n\n" "Provide Computed Attributes\n\n"
"$Id: ComputedAttribute.c,v 1.1 1999/03/10 15:20:23 jim Exp $\n", "$Id: ComputedAttribute.c,v 1.2 1999/06/10 20:08:55 jim Exp $\n",
OBJECT(NULL),PYTHON_API_VERSION); OBJECT(NULL),PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: Missing.c,v 1.8 1998/11/17 19:54:33 jim Exp $ $Id: Missing.c,v 1.9 1999/06/10 20:09:47 jim Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
static char Missing_module_documentation[] = static char Missing_module_documentation[] =
"" ""
"\n$Id: Missing.c,v 1.8 1998/11/17 19:54:33 jim Exp $" "\n$Id: Missing.c,v 1.9 1999/06/10 20:09:47 jim Exp $"
; ;
#include "ExtensionClass.h" #include "ExtensionClass.h"
...@@ -64,6 +64,7 @@ static PyObject *theValue; ...@@ -64,6 +64,7 @@ static PyObject *theValue;
static void static void
Missing_dealloc(Missing *self) Missing_dealloc(Missing *self)
{ {
Py_DECREF(self->ob_type);
PyMem_DEL(self); PyMem_DEL(self);
} }
...@@ -288,7 +289,7 @@ void ...@@ -288,7 +289,7 @@ void
initMissing() initMissing()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.8 $"; char *rev="$Revision: 1.9 $";
if(! ((vname=PyString_FromString("V")) if(! ((vname=PyString_FromString("V"))
&& (Missing_dot_Value=PyString_FromString("Missing.Value")) && (Missing_dot_Value=PyString_FromString("Missing.Value"))
...@@ -324,6 +325,9 @@ initMissing() ...@@ -324,6 +325,9 @@ initMissing()
Revision Log: Revision Log:
$Log: Missing.c,v $ $Log: Missing.c,v $
Revision 1.9 1999/06/10 20:09:47 jim
Updated to use new ExtensionClass destructor protocol.
Revision 1.8 1998/11/17 19:54:33 jim Revision 1.8 1998/11/17 19:54:33 jim
new copyright. new copyright.
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: MultiMapping.c,v 1.7 1998/11/17 20:20:17 jim Exp $ $Id: MultiMapping.c,v 1.8 1999/06/10 20:10:46 jim Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -162,6 +162,7 @@ static void ...@@ -162,6 +162,7 @@ static void
MM_dealloc(MMobject *self) MM_dealloc(MMobject *self)
{ {
Py_XDECREF(self->data); Py_XDECREF(self->data);
Py_DECREF(self->ob_type);
PyMem_DEL(self); PyMem_DEL(self);
} }
...@@ -233,13 +234,13 @@ void ...@@ -233,13 +234,13 @@ void
initMultiMapping() initMultiMapping()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.7 $"; char *rev="$Revision: 1.8 $";
m = Py_InitModule4( m = Py_InitModule4(
"MultiMapping", MultiMapping_methods, "MultiMapping", MultiMapping_methods,
"MultiMapping -- Wrap multiple mapping objects for lookup" "MultiMapping -- Wrap multiple mapping objects for lookup"
"\n\n" "\n\n"
"$Id: MultiMapping.c,v 1.7 1998/11/17 20:20:17 jim Exp $\n", "$Id: MultiMapping.c,v 1.8 1999/06/10 20:10:46 jim Exp $\n",
(PyObject*)NULL,PYTHON_API_VERSION); (PyObject*)NULL,PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
PyExtensionClass_Export(d,"MultiMapping",MMtype); PyExtensionClass_Export(d,"MultiMapping",MMtype);
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
****************************************************************************/ ****************************************************************************/
static char Record_module_documentation[] = static char Record_module_documentation[] =
"" ""
"\n$Id: Record.c,v 1.7 1999/04/16 15:21:40 jim Exp $" "\n$Id: Record.c,v 1.8 1999/06/10 20:11:53 jim Exp $"
; ;
#ifdef PERSISTENCE #ifdef PERSISTENCE
...@@ -250,6 +250,7 @@ static void ...@@ -250,6 +250,7 @@ static void
Record_dealloc(Record *self) Record_dealloc(Record *self)
{ {
Record_deal(self); Record_deal(self);
Py_DECREF(self->ob_type);
PyMem_DEL(self); PyMem_DEL(self);
} }
...@@ -591,7 +592,7 @@ void ...@@ -591,7 +592,7 @@ void
initRecord() initRecord()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.7 $"; char *rev="$Revision: 1.8 $";
UNLESS(py___record_schema__=PyString_FromString("__record_schema__")) return; UNLESS(py___record_schema__=PyString_FromString("__record_schema__")) return;
...@@ -630,6 +631,9 @@ initRecord() ...@@ -630,6 +631,9 @@ initRecord()
Revision Log: Revision Log:
$Log: Record.c,v $ $Log: Record.c,v $
Revision 1.8 1999/06/10 20:11:53 jim
Updated to use new ExtensionClass destructor protocol.
Revision 1.7 1999/04/16 15:21:40 jim Revision 1.7 1999/04/16 15:21:40 jim
Added logic to fall back to getattr when getitem fails. Added logic to fall back to getattr when getitem fails.
This is needed to make computed attributes work in ZTables, This is needed to make computed attributes work in ZTables,
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: ComputedAttribute.c,v 1.1 1999/03/10 15:20:23 jim Exp $ $Id: ComputedAttribute.c,v 1.2 1999/06/10 20:08:55 jim Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -79,6 +79,7 @@ static void ...@@ -79,6 +79,7 @@ static void
CA_dealloc(CA *self) CA_dealloc(CA *self)
{ {
Py_DECREF(self->callable); Py_DECREF(self->callable);
Py_DECREF(self->ob_type);
PyMem_DEL(self); PyMem_DEL(self);
} }
...@@ -123,7 +124,7 @@ void ...@@ -123,7 +124,7 @@ void
initComputedAttribute() initComputedAttribute()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.1 $"; char *rev="$Revision: 1.2 $";
UNLESS(ExtensionClassImported) return; UNLESS(ExtensionClassImported) return;
...@@ -133,7 +134,7 @@ initComputedAttribute() ...@@ -133,7 +134,7 @@ initComputedAttribute()
/* Create the module and add the functions */ /* Create the module and add the functions */
m = Py_InitModule4("ComputedAttribute", methods, m = Py_InitModule4("ComputedAttribute", methods,
"Provide Computed Attributes\n\n" "Provide Computed Attributes\n\n"
"$Id: ComputedAttribute.c,v 1.1 1999/03/10 15:20:23 jim Exp $\n", "$Id: ComputedAttribute.c,v 1.2 1999/06/10 20:08:55 jim Exp $\n",
OBJECT(NULL),PYTHON_API_VERSION); OBJECT(NULL),PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: Missing.c,v 1.8 1998/11/17 19:54:33 jim Exp $ $Id: Missing.c,v 1.9 1999/06/10 20:09:47 jim Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
static char Missing_module_documentation[] = static char Missing_module_documentation[] =
"" ""
"\n$Id: Missing.c,v 1.8 1998/11/17 19:54:33 jim Exp $" "\n$Id: Missing.c,v 1.9 1999/06/10 20:09:47 jim Exp $"
; ;
#include "ExtensionClass.h" #include "ExtensionClass.h"
...@@ -64,6 +64,7 @@ static PyObject *theValue; ...@@ -64,6 +64,7 @@ static PyObject *theValue;
static void static void
Missing_dealloc(Missing *self) Missing_dealloc(Missing *self)
{ {
Py_DECREF(self->ob_type);
PyMem_DEL(self); PyMem_DEL(self);
} }
...@@ -288,7 +289,7 @@ void ...@@ -288,7 +289,7 @@ void
initMissing() initMissing()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.8 $"; char *rev="$Revision: 1.9 $";
if(! ((vname=PyString_FromString("V")) if(! ((vname=PyString_FromString("V"))
&& (Missing_dot_Value=PyString_FromString("Missing.Value")) && (Missing_dot_Value=PyString_FromString("Missing.Value"))
...@@ -324,6 +325,9 @@ initMissing() ...@@ -324,6 +325,9 @@ initMissing()
Revision Log: Revision Log:
$Log: Missing.c,v $ $Log: Missing.c,v $
Revision 1.9 1999/06/10 20:09:47 jim
Updated to use new ExtensionClass destructor protocol.
Revision 1.8 1998/11/17 19:54:33 jim Revision 1.8 1998/11/17 19:54:33 jim
new copyright. new copyright.
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: MultiMapping.c,v 1.7 1998/11/17 20:20:17 jim Exp $ $Id: MultiMapping.c,v 1.8 1999/06/10 20:10:46 jim Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -162,6 +162,7 @@ static void ...@@ -162,6 +162,7 @@ static void
MM_dealloc(MMobject *self) MM_dealloc(MMobject *self)
{ {
Py_XDECREF(self->data); Py_XDECREF(self->data);
Py_DECREF(self->ob_type);
PyMem_DEL(self); PyMem_DEL(self);
} }
...@@ -233,13 +234,13 @@ void ...@@ -233,13 +234,13 @@ void
initMultiMapping() initMultiMapping()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.7 $"; char *rev="$Revision: 1.8 $";
m = Py_InitModule4( m = Py_InitModule4(
"MultiMapping", MultiMapping_methods, "MultiMapping", MultiMapping_methods,
"MultiMapping -- Wrap multiple mapping objects for lookup" "MultiMapping -- Wrap multiple mapping objects for lookup"
"\n\n" "\n\n"
"$Id: MultiMapping.c,v 1.7 1998/11/17 20:20:17 jim Exp $\n", "$Id: MultiMapping.c,v 1.8 1999/06/10 20:10:46 jim Exp $\n",
(PyObject*)NULL,PYTHON_API_VERSION); (PyObject*)NULL,PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
PyExtensionClass_Export(d,"MultiMapping",MMtype); PyExtensionClass_Export(d,"MultiMapping",MMtype);
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
****************************************************************************/ ****************************************************************************/
static char Record_module_documentation[] = static char Record_module_documentation[] =
"" ""
"\n$Id: Record.c,v 1.7 1999/04/16 15:21:40 jim Exp $" "\n$Id: Record.c,v 1.8 1999/06/10 20:11:53 jim Exp $"
; ;
#ifdef PERSISTENCE #ifdef PERSISTENCE
...@@ -250,6 +250,7 @@ static void ...@@ -250,6 +250,7 @@ static void
Record_dealloc(Record *self) Record_dealloc(Record *self)
{ {
Record_deal(self); Record_deal(self);
Py_DECREF(self->ob_type);
PyMem_DEL(self); PyMem_DEL(self);
} }
...@@ -591,7 +592,7 @@ void ...@@ -591,7 +592,7 @@ void
initRecord() initRecord()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.7 $"; char *rev="$Revision: 1.8 $";
UNLESS(py___record_schema__=PyString_FromString("__record_schema__")) return; UNLESS(py___record_schema__=PyString_FromString("__record_schema__")) return;
...@@ -630,6 +631,9 @@ initRecord() ...@@ -630,6 +631,9 @@ initRecord()
Revision Log: Revision Log:
$Log: Record.c,v $ $Log: Record.c,v $
Revision 1.8 1999/06/10 20:11:53 jim
Updated to use new ExtensionClass destructor protocol.
Revision 1.7 1999/04/16 15:21:40 jim Revision 1.7 1999/04/16 15:21:40 jim
Added logic to fall back to getattr when getitem fails. Added logic to fall back to getattr when getitem fails.
This is needed to make computed attributes work in ZTables, This is needed to make computed attributes work in ZTables,
......
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