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

Updated to use new ExtensionClass destructor protocol.

parent 1c675814
......@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
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,
contact:
......@@ -79,6 +79,7 @@ static void
CA_dealloc(CA *self)
{
Py_DECREF(self->callable);
Py_DECREF(self->ob_type);
PyMem_DEL(self);
}
......@@ -123,7 +124,7 @@ void
initComputedAttribute()
{
PyObject *m, *d;
char *rev="$Revision: 1.1 $";
char *rev="$Revision: 1.2 $";
UNLESS(ExtensionClassImported) return;
......@@ -133,7 +134,7 @@ initComputedAttribute()
/* Create the module and add the functions */
m = Py_InitModule4("ComputedAttribute", methods,
"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);
d = PyModule_GetDict(m);
......
......@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
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,
contact:
......@@ -47,7 +47,7 @@
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"
......@@ -64,6 +64,7 @@ static PyObject *theValue;
static void
Missing_dealloc(Missing *self)
{
Py_DECREF(self->ob_type);
PyMem_DEL(self);
}
......@@ -288,7 +289,7 @@ void
initMissing()
{
PyObject *m, *d;
char *rev="$Revision: 1.8 $";
char *rev="$Revision: 1.9 $";
if(! ((vname=PyString_FromString("V"))
&& (Missing_dot_Value=PyString_FromString("Missing.Value"))
......@@ -324,6 +325,9 @@ initMissing()
Revision Log:
$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
new copyright.
......
......@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
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,
contact:
......@@ -162,6 +162,7 @@ static void
MM_dealloc(MMobject *self)
{
Py_XDECREF(self->data);
Py_DECREF(self->ob_type);
PyMem_DEL(self);
}
......@@ -233,13 +234,13 @@ void
initMultiMapping()
{
PyObject *m, *d;
char *rev="$Revision: 1.7 $";
char *rev="$Revision: 1.8 $";
m = Py_InitModule4(
"MultiMapping", MultiMapping_methods,
"MultiMapping -- Wrap multiple mapping objects for lookup"
"\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);
d = PyModule_GetDict(m);
PyExtensionClass_Export(d,"MultiMapping",MMtype);
......
......@@ -84,7 +84,7 @@
****************************************************************************/
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
......@@ -250,6 +250,7 @@ static void
Record_dealloc(Record *self)
{
Record_deal(self);
Py_DECREF(self->ob_type);
PyMem_DEL(self);
}
......@@ -591,7 +592,7 @@ void
initRecord()
{
PyObject *m, *d;
char *rev="$Revision: 1.7 $";
char *rev="$Revision: 1.8 $";
UNLESS(py___record_schema__=PyString_FromString("__record_schema__")) return;
......@@ -630,6 +631,9 @@ initRecord()
Revision Log:
$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
Added logic to fall back to getattr when getitem fails.
This is needed to make computed attributes work in ZTables,
......
......@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
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,
contact:
......@@ -79,6 +79,7 @@ static void
CA_dealloc(CA *self)
{
Py_DECREF(self->callable);
Py_DECREF(self->ob_type);
PyMem_DEL(self);
}
......@@ -123,7 +124,7 @@ void
initComputedAttribute()
{
PyObject *m, *d;
char *rev="$Revision: 1.1 $";
char *rev="$Revision: 1.2 $";
UNLESS(ExtensionClassImported) return;
......@@ -133,7 +134,7 @@ initComputedAttribute()
/* Create the module and add the functions */
m = Py_InitModule4("ComputedAttribute", methods,
"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);
d = PyModule_GetDict(m);
......
......@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
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,
contact:
......@@ -47,7 +47,7 @@
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"
......@@ -64,6 +64,7 @@ static PyObject *theValue;
static void
Missing_dealloc(Missing *self)
{
Py_DECREF(self->ob_type);
PyMem_DEL(self);
}
......@@ -288,7 +289,7 @@ void
initMissing()
{
PyObject *m, *d;
char *rev="$Revision: 1.8 $";
char *rev="$Revision: 1.9 $";
if(! ((vname=PyString_FromString("V"))
&& (Missing_dot_Value=PyString_FromString("Missing.Value"))
......@@ -324,6 +325,9 @@ initMissing()
Revision Log:
$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
new copyright.
......
......@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
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,
contact:
......@@ -162,6 +162,7 @@ static void
MM_dealloc(MMobject *self)
{
Py_XDECREF(self->data);
Py_DECREF(self->ob_type);
PyMem_DEL(self);
}
......@@ -233,13 +234,13 @@ void
initMultiMapping()
{
PyObject *m, *d;
char *rev="$Revision: 1.7 $";
char *rev="$Revision: 1.8 $";
m = Py_InitModule4(
"MultiMapping", MultiMapping_methods,
"MultiMapping -- Wrap multiple mapping objects for lookup"
"\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);
d = PyModule_GetDict(m);
PyExtensionClass_Export(d,"MultiMapping",MMtype);
......
......@@ -84,7 +84,7 @@
****************************************************************************/
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
......@@ -250,6 +250,7 @@ static void
Record_dealloc(Record *self)
{
Record_deal(self);
Py_DECREF(self->ob_type);
PyMem_DEL(self);
}
......@@ -591,7 +592,7 @@ void
initRecord()
{
PyObject *m, *d;
char *rev="$Revision: 1.7 $";
char *rev="$Revision: 1.8 $";
UNLESS(py___record_schema__=PyString_FromString("__record_schema__")) return;
......@@ -630,6 +631,9 @@ initRecord()
Revision Log:
$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
Added logic to fall back to getattr when getitem fails.
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