Following Willian's proposal,deleted the print function, which caused crashes.

The objects are now printed with the repr function.
This commit is contained in:
2003-07-04 16:06:39 +00:00
parent 28b8e667a0
commit 82e1783dcb
11 changed files with 28 additions and 25 deletions

View File

@@ -442,12 +442,13 @@ static int IpoSetAttr (C_Ipo *self, char *name, PyObject *value)
/* Description: This is a callback function for the C_Ipo type. It */
/* builds a meaninful string to 'print' ipo objects. */
/*****************************************************************************/
/*
static int IpoPrint(C_Ipo *self, FILE *fp, int flags)
{
fprintf(fp, "[Ipo \"%s\"]", self->ipo->id.name+2);
return 0;
}
*/
/*****************************************************************************/
/* Function: IpoRepr */
/* Description: This is a callback function for the C_Ipo type. It */
@@ -455,7 +456,7 @@ static int IpoPrint(C_Ipo *self, FILE *fp, int flags)
/*****************************************************************************/
static PyObject *IpoRepr (C_Ipo *self)
{
return PyString_FromString(self->ipo->id.name+2);
return PyString_FromFormat("[Ipo \"%s\"]", self->ipo->id.name+2);
}
/* Three Python Ipo_Type helper functions needed by the Object module: */