Commit 52284527 52284527e761d8b6ffa8c15196edc18e8b061356 by Wojciech Polak

Return int from mu_py_init_*()

1 parent 2182f6e0
......@@ -124,21 +124,21 @@ typedef int (*mulist_extractor_fp) (void *data, PyObject **dst);
extern void mu_py_init (void);
extern void mu_py_init_address (void);
extern void mu_py_init_attribute (void);
extern void mu_py_init_auth (void);
extern void mu_py_init_body (void);
extern void mu_py_init_debug (void);
extern void mu_py_init_envelope (void);
extern void mu_py_init_header (void);
extern void mu_py_init_folder (void);
extern void mu_py_init_mailer (void);
extern void mu_py_init_mailbox (void);
extern void mu_py_init_mailcap (void);
extern void mu_py_init_message (void);
extern void mu_py_init_mime (void);
extern void mu_py_init_stream (void);
extern void mu_py_init_url (void);
extern int mu_py_init_address (void);
extern int mu_py_init_attribute (void);
extern int mu_py_init_auth (void);
extern int mu_py_init_body (void);
extern int mu_py_init_debug (void);
extern int mu_py_init_envelope (void);
extern int mu_py_init_header (void);
extern int mu_py_init_folder (void);
extern int mu_py_init_mailer (void);
extern int mu_py_init_mailbox (void);
extern int mu_py_init_mailcap (void);
extern int mu_py_init_message (void);
extern int mu_py_init_mime (void);
extern int mu_py_init_stream (void);
extern int mu_py_init_url (void);
extern PyObject * mu_py_mulist_to_pylist (mu_list_t list,
mulist_extractor_fp fnc);
......
......@@ -324,12 +324,11 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
void
int
mu_py_init_address (void)
{
PyAddressType.tp_new = PyType_GenericNew;
if (PyType_Ready (&PyAddressType) < 0)
return;
return PyType_Ready (&PyAddressType);
}
void
......
......@@ -227,12 +227,11 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
void
int
mu_py_init_attribute (void)
{
PyAttributeType.tp_new = PyType_GenericNew;
if (PyType_Ready (&PyAttributeType) < 0)
return;
return PyType_Ready (&PyAttributeType);
}
void
......
......@@ -666,7 +666,7 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
void
int
mu_py_init_auth (void)
{
PyAuthorityType.tp_new = PyType_GenericNew;
......@@ -675,13 +675,14 @@ mu_py_init_auth (void)
PyAuthDataType.tp_new = PyType_GenericNew;
if (PyType_Ready (&PyAuthorityType) < 0)
return;
return -1;
if (PyType_Ready (&PyTicketType) < 0)
return;
return -1;
if (PyType_Ready (&PyWicketType) < 0)
return;
return -1;
if (PyType_Ready (&PyAuthDataType) < 0)
return;
return -1;
return 0;
}
void
......
......@@ -137,12 +137,11 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
void
int
mu_py_init_body (void)
{
PyBodyType.tp_new = PyType_GenericNew;
if (PyType_Ready (&PyBodyType) < 0)
return;
return PyType_Ready (&PyBodyType);
}
void
......
......@@ -100,12 +100,11 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
void
int
mu_py_init_debug (void)
{
PyDebugType.tp_new = PyType_GenericNew;
if (PyType_Ready (&PyDebugType) < 0)
return;
return PyType_Ready (&PyDebugType);
}
void
......
......@@ -148,12 +148,11 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
void
int
mu_py_init_envelope ()
{
PyEnvelopeType.tp_new = PyType_GenericNew;
if (PyType_Ready (&PyEnvelopeType) < 0)
return;
return PyType_Ready (&PyEnvelopeType);
}
void
......
......@@ -297,12 +297,11 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
void
int
mu_py_init_folder (void)
{
PyFolderType.tp_new = PyType_GenericNew;
if (PyType_Ready (&PyFolderType) < 0)
return;
return PyType_Ready (&PyFolderType);
}
void
......
......@@ -206,12 +206,11 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
void
int
mu_py_init_header (void)
{
PyHeaderType.tp_new = PyType_GenericNew;
if (PyType_Ready (&PyHeaderType) < 0)
return;
return PyType_Ready (&PyHeaderType);
}
void
......
......@@ -418,12 +418,11 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
void
int
mu_py_init_mailbox (void)
{
PyMailboxType.tp_new = PyType_GenericNew;
if (PyType_Ready (&PyMailboxType) < 0)
return;
return PyType_Ready (&PyMailboxType);
}
void
......
......@@ -292,14 +292,16 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
void
int
mu_py_init_mailcap (void)
{
PyMailcapType.tp_new = PyType_GenericNew;
PyMailcapEntryType.tp_new = PyType_GenericNew;
if (PyType_Ready (&PyMailcapType) < 0 ||
PyType_Ready (&PyMailcapEntryType) < 0)
return;
if (PyType_Ready (&PyMailcapType) < 0)
return -1;
if (PyType_Ready (&PyMailcapEntryType) < 0)
return -1;
return 0;
}
void
......
......@@ -209,12 +209,11 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
void
int
mu_py_init_mailer (void)
{
PyMailerType.tp_new = PyType_GenericNew;
if (PyType_Ready (&PyMailerType) < 0)
return;
return PyType_Ready (&PyMailerType);
}
void
......
......@@ -404,12 +404,11 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
void
int
mu_py_init_message (void)
{
PyMessageType.tp_new = PyType_GenericNew;
if (PyType_Ready (&PyMessageType) < 0)
return;
return PyType_Ready (&PyMessageType);
}
void
......
......@@ -251,12 +251,11 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
void
int
mu_py_init_mime (void)
{
PyMimeType.tp_new = PyType_GenericNew;
if (PyType_Ready (&PyMimeType) < 0)
return;
return PyType_Ready (&PyMimeType);
}
void
......
......@@ -391,12 +391,11 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
void
int
mu_py_init_stream (void)
{
PyStreamType.tp_new = PyType_GenericNew;
if (PyType_Ready (&PyStreamType) < 0)
return;
return PyType_Ready (&PyStreamType);
}
void
......
......@@ -276,12 +276,11 @@ static PyMethodDef methods[] = {
{ NULL, NULL, 0, NULL }
};
void
int
mu_py_init_url (void)
{
PyUrlType.tp_new = PyType_GenericNew;
if (PyType_Ready (&PyUrlType) < 0)
return;
return PyType_Ready (&PyUrlType);
}
void
......