Removed C99 struct initializers for compatibility with 'legacy' compilers (like MSVC...
authorAdrian Wilkins <adrian.wilkins@gmail.com>
Tue, 1 Jul 2008 23:36:39 +0000 (00:36 +0100)
committerAdrian Wilkins <adrian.wilkins@gmail.com>
Tue, 1 Jul 2008 23:36:39 +0000 (00:36 +0100)
client.c
editor.c
ra.c
repos.c
wc.c

index 95a2e1425e9a9b35991f5e433140d487bf121841..465424254d874e34dd0c23ac51c22c205d9114a3 100644 (file)
--- a/client.c
+++ b/client.c
@@ -606,11 +606,64 @@ static void config_dealloc(PyObject *obj)
 
 PyTypeObject Config_Type = {
        PyObject_HEAD_INIT(NULL) 0,
-       .tp_name = "client.Config",
-       .tp_basicsize = sizeof(ConfigObject),
-       .tp_methods = config_methods,
-       .tp_getset = config_getset,
-       .tp_dealloc = (destructor)config_dealloc,
+       "client.Config", /*     const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(ConfigObject),  /*  tp_basicsize    */
+       0,  /*  tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       (destructor)config_dealloc, /*  destructor tp_dealloc;  */
+       NULL, /*        printfunc tp_print;     */
+       NULL, /*        getattrfunc tp_getattr; */
+       NULL, /*        setattrfunc tp_setattr; */
+       NULL, /*        cmpfunc tp_compare;     */
+       NULL, /*        reprfunc tp_repr;       */
+       
+       /* Method suites for standard classes */
+       
+       NULL, /*        PyNumberMethods *tp_as_number;  */
+       NULL, /*        PySequenceMethods *tp_as_sequence;      */
+       NULL, /*        PyMappingMethods *tp_as_mapping;        */
+       
+       /* More standard operations (here for binary compatibility) */
+       
+       NULL, /*        hashfunc tp_hash;       */
+       NULL, /*        ternaryfunc tp_call;    */
+       NULL, /*        reprfunc tp_str;        */
+       NULL, /*        getattrofunc tp_getattro;       */
+       NULL, /*        setattrofunc tp_setattro;       */
+       
+       /* Functions to access object as input/output buffer */
+       NULL, /*        PyBufferProcs *tp_as_buffer;    */
+       
+       /* Flags to define presence of optional/expanded features */
+       0, /*   long tp_flags;  */
+       
+       NULL, /*        const char *tp_doc;  Documentation string */
+       
+       /* Assigned meaning in release 2.0 */
+       /* call function for all accessible objects */
+       NULL, /*        traverseproc tp_traverse;       */
+       
+       /* delete references to contained objects */
+       NULL, /*        inquiry tp_clear;       */
+       
+       /* Assigned meaning in release 2.1 */
+       /* rich comparisons */
+       NULL, /*        richcmpfunc tp_richcompare;     */
+       
+       /* weak reference enabler */
+       0, /*   Py_ssize_t tp_weaklistoffset;   */
+       
+       /* Added in release 2.2 */
+       /* Iterators */
+       NULL, /*        getiterfunc tp_iter;    */
+       NULL, /*        iternextfunc tp_iternext;       */
+       
+       /* Attribute descriptor and subclassing stuff */
+       config_methods, /*      struct PyMethodDef *tp_methods; */
+       NULL, /*        struct PyMemberDef *tp_members; */
+       config_getset, /*       struct PyGetSetDef *tp_getset;  */
 };
 
 static void configitem_dealloc(PyObject *self)
@@ -623,22 +676,86 @@ static void configitem_dealloc(PyObject *self)
 
 PyTypeObject ConfigItem_Type = {
        PyObject_HEAD_INIT(NULL) 0,
-       .tp_name = "client.ConfigItem",
-       .tp_basicsize = sizeof(ConfigItemObject),
-       .tp_dealloc = (destructor)configitem_dealloc,
+       "client.ConfigItem", /* const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(ConfigItemObject), 
+       0,/*    Py_ssize_t tp_basicsize, tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       (destructor)configitem_dealloc, /*      destructor tp_dealloc;  */
 };
 
 
-
-
 PyTypeObject Client_Type = {
-       PyObject_HEAD_INIT(&PyType_Type) 0,
-       .tp_name = "client.Client",
-       .tp_basicsize = sizeof(ClientObject),
-       .tp_methods = client_methods,
-       .tp_dealloc = client_dealloc,
-       .tp_new = client_new,
-       .tp_getset = client_getset
+       PyObject_HEAD_INIT(NULL) 0,
+       /*      PyObject_VAR_HEAD       */
+       "client.Client", /*     const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(ClientObject),
+       0,/*    Py_ssize_t tp_basicsize, tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       client_dealloc, /*      destructor tp_dealloc;  */
+       NULL, /*        printfunc tp_print;     */
+       NULL, /*        getattrfunc tp_getattr; */
+       NULL, /*        setattrfunc tp_setattr; */
+       NULL, /*        cmpfunc tp_compare;     */
+       NULL, /*        reprfunc tp_repr;       */
+       
+       /* Method suites for standard classes */
+       
+       NULL, /*        PyNumberMethods *tp_as_number;  */
+       NULL, /*        PySequenceMethods *tp_as_sequence;      */
+       NULL, /*        PyMappingMethods *tp_as_mapping;        */
+       
+       /* More standard operations (here for binary compatibility) */
+       
+       NULL, /*        hashfunc tp_hash;       */
+       NULL, /*        ternaryfunc tp_call;    */
+       NULL, /*        reprfunc tp_str;        */
+       NULL, /*        getattrofunc tp_getattro;       */
+       NULL, /*        setattrofunc tp_setattro;       */
+       
+       /* Functions to access object as input/output buffer */
+       NULL, /*        PyBufferProcs *tp_as_buffer;    */
+       
+       /* Flags to define presence of optional/expanded features */
+       0, /*   long tp_flags;  */
+       
+       NULL, /*        const char *tp_doc;  Documentation string */
+       
+       /* Assigned meaning in release 2.0 */
+       /* call function for all accessible objects */
+       NULL, /*        traverseproc tp_traverse;       */
+       
+       /* delete references to contained objects */
+       NULL, /*        inquiry tp_clear;       */
+       
+       /* Assigned meaning in release 2.1 */
+       /* rich comparisons */
+       NULL, /*        richcmpfunc tp_richcompare;     */
+       
+       /* weak reference enabler */
+       0, /*   Py_ssize_t tp_weaklistoffset;   */
+       
+       /* Added in release 2.2 */
+       /* Iterators */
+       NULL, /*        getiterfunc tp_iter;    */
+       NULL, /*        iternextfunc tp_iternext;       */
+       
+       /* Attribute descriptor and subclassing stuff */
+       client_methods, /*      struct PyMethodDef *tp_methods; */
+       NULL, /*        struct PyMemberDef *tp_members; */
+       client_getset, /*       struct PyGetSetDef *tp_getset;  */
+       NULL, /*        struct _typeobject *tp_base;    */
+       NULL, /*        PyObject *tp_dict;      */
+       NULL, /*        descrgetfunc tp_descr_get;      */
+       NULL, /*        descrsetfunc tp_descr_set;      */
+       0, /*   Py_ssize_t tp_dictoffset;       */
+       NULL, /*        initproc tp_init;       */
+       NULL, /*        allocfunc tp_alloc;     */
+       client_new, /*  newfunc tp_new; */
+
 };
 
 static PyObject *get_config(PyObject *self, PyObject *args)
index 3a63721b14d4aeca29a1a75f484a07574a8dc21b..fb640b5b4d1c4081f213108b9537b59b69b225c6 100644 (file)
--- a/editor.c
+++ b/editor.c
@@ -111,11 +111,31 @@ static PyObject *txdelta_call(PyObject *self, PyObject *args, PyObject *kwargs)
 }
 
 PyTypeObject TxDeltaWindowHandler_Type = {
-       PyObject_HEAD_INIT(&PyType_Type) 0,
-       .tp_basicsize = sizeof(TxDeltaWindowHandlerObject),
-       .tp_name = "ra.TxDeltaWindowHandler",
-       .tp_call = txdelta_call,
-       .tp_dealloc = (destructor)PyObject_Del
+       PyObject_HEAD_INIT(NULL) 0,
+       "ra.TxDeltaWindowHandler", /*   const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(TxDeltaWindowHandlerObject), 
+       0,/*    Py_ssize_t tp_basicsize, tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       (destructor)PyObject_Del, /*    destructor tp_dealloc;  */
+       NULL, /*        printfunc tp_print;     */
+       NULL, /*        getattrfunc tp_getattr; */
+       NULL, /*        setattrfunc tp_setattr; */
+       NULL, /*        cmpfunc tp_compare;     */
+       NULL, /*        reprfunc tp_repr;       */
+       
+       /* Method suites for standard classes */
+       
+       NULL, /*        PyNumberMethods *tp_as_number;  */
+       NULL, /*        PySequenceMethods *tp_as_sequence;      */
+       NULL, /*        PyMappingMethods *tp_as_mapping;        */
+       
+       /* More standard operations (here for binary compatibility) */
+       
+       NULL, /*        hashfunc tp_hash;       */
+       txdelta_call, /*        ternaryfunc tp_call;    */
+       
 };
 
 static PyObject *py_file_editor_apply_textdelta(PyObject *self, PyObject *args)
@@ -188,11 +208,63 @@ static PyMethodDef py_file_editor_methods[] = {
 };
 
 PyTypeObject FileEditor_Type = { 
-       PyObject_HEAD_INIT(&PyType_Type) 0,
-       .tp_name = "ra.FileEditor",
-       .tp_basicsize = sizeof(EditorObject),
-       .tp_methods = py_file_editor_methods,
-       .tp_dealloc = (destructor)PyObject_Del,
+       PyObject_HEAD_INIT(NULL) 0, 
+       "ra.FileEditor", /*     const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(EditorObject), 
+       0,/*    Py_ssize_t tp_basicsize, tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       (destructor)PyObject_Del, /*    destructor tp_dealloc;  */
+       NULL, /*        printfunc tp_print;     */
+       NULL, /*        getattrfunc tp_getattr; */
+       NULL, /*        setattrfunc tp_setattr; */
+       NULL, /*        cmpfunc tp_compare;     */
+       NULL, /*        reprfunc tp_repr;       */
+       
+       /* Method suites for standard classes */
+       
+       NULL, /*        PyNumberMethods *tp_as_number;  */
+       NULL, /*        PySequenceMethods *tp_as_sequence;      */
+       NULL, /*        PyMappingMethods *tp_as_mapping;        */
+       
+       /* More standard operations (here for binary compatibility) */
+       
+       NULL, /*        hashfunc tp_hash;       */
+       NULL, /*        ternaryfunc tp_call;    */
+       NULL, /*        reprfunc tp_str;        */
+       NULL, /*        getattrofunc tp_getattro;       */
+       NULL, /*        setattrofunc tp_setattro;       */
+       
+       /* Functions to access object as input/output buffer */
+       NULL, /*        PyBufferProcs *tp_as_buffer;    */
+       
+       /* Flags to define presence of optional/expanded features */
+       0, /*   long tp_flags;  */
+       
+       NULL, /*        const char *tp_doc;  Documentation string */
+       
+       /* Assigned meaning in release 2.0 */
+       /* call function for all accessible objects */
+       NULL, /*        traverseproc tp_traverse;       */
+       
+       /* delete references to contained objects */
+       NULL, /*        inquiry tp_clear;       */
+       
+       /* Assigned meaning in release 2.1 */
+       /* rich comparisons */
+       NULL, /*        richcmpfunc tp_richcompare;     */
+       
+       /* weak reference enabler */
+       0, /*   Py_ssize_t tp_weaklistoffset;   */
+       
+       /* Added in release 2.2 */
+       /* Iterators */
+       NULL, /*        getiterfunc tp_iter;    */
+       NULL, /*        iternextfunc tp_iternext;       */
+       
+       /* Attribute descriptor and subclassing stuff */
+       py_file_editor_methods, /*      struct PyMethodDef *tp_methods; */
 };
 
 static PyObject *py_dir_editor_delete_entry(PyObject *self, PyObject *args)
@@ -403,11 +475,64 @@ static PyMethodDef py_dir_editor_methods[] = {
 };
 
 PyTypeObject DirectoryEditor_Type = { 
-       PyObject_HEAD_INIT(&PyType_Type) 0,
-       .tp_name = "ra.DirEditor",
-       .tp_basicsize = sizeof(EditorObject),
-       .tp_methods = py_dir_editor_methods,
-       .tp_dealloc = (destructor)PyObject_Del,
+       PyObject_HEAD_INIT(NULL) 0,
+       "ra.DirEditor", /*      const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(EditorObject), 
+       0,/*    Py_ssize_t tp_basicsize, tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       (destructor)PyObject_Del, /*    destructor tp_dealloc;  */
+       NULL, /*        printfunc tp_print;     */
+       NULL, /*        getattrfunc tp_getattr; */
+       NULL, /*        setattrfunc tp_setattr; */
+       NULL, /*        cmpfunc tp_compare;     */
+       NULL, /*        reprfunc tp_repr;       */
+       
+       /* Method suites for standard classes */
+       
+       NULL, /*        PyNumberMethods *tp_as_number;  */
+       NULL, /*        PySequenceMethods *tp_as_sequence;      */
+       NULL, /*        PyMappingMethods *tp_as_mapping;        */
+       
+       /* More standard operations (here for binary compatibility) */
+       
+       NULL, /*        hashfunc tp_hash;       */
+       NULL, /*        ternaryfunc tp_call;    */
+       NULL, /*        reprfunc tp_str;        */
+       NULL, /*        getattrofunc tp_getattro;       */
+       NULL, /*        setattrofunc tp_setattro;       */
+       
+       /* Functions to access object as input/output buffer */
+       NULL, /*        PyBufferProcs *tp_as_buffer;    */
+       
+       /* Flags to define presence of optional/expanded features */
+       0, /*   long tp_flags;  */
+       
+       NULL, /*        const char *tp_doc;  Documentation string */
+       
+       /* Assigned meaning in release 2.0 */
+       /* call function for all accessible objects */
+       NULL, /*        traverseproc tp_traverse;       */
+       
+       /* delete references to contained objects */
+       NULL, /*        inquiry tp_clear;       */
+       
+       /* Assigned meaning in release 2.1 */
+       /* rich comparisons */
+       NULL, /*        richcmpfunc tp_richcompare;     */
+       
+       /* weak reference enabler */
+       0, /*   Py_ssize_t tp_weaklistoffset;   */
+       
+       /* Added in release 2.2 */
+       /* Iterators */
+       NULL, /*        getiterfunc tp_iter;    */
+       NULL, /*        iternextfunc tp_iternext;       */
+       
+       /* Attribute descriptor and subclassing stuff */
+       py_dir_editor_methods, /*       struct PyMethodDef *tp_methods; */
+       
 };
 
 static PyObject *py_editor_set_target_revision(PyObject *self, PyObject *args)
@@ -497,11 +622,63 @@ static PyMethodDef py_editor_methods[] = {
 };
 
 PyTypeObject Editor_Type = { 
-       PyObject_HEAD_INIT(&PyType_Type) 0,
-       .tp_name = "ra.Editor",
-       .tp_basicsize = sizeof(EditorObject),
-       .tp_methods = py_editor_methods,
-       .tp_dealloc = py_editor_dealloc,
+       PyObject_HEAD_INIT(NULL) 0,
+       "ra.Editor", /* const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(EditorObject), 
+       0,/*    Py_ssize_t tp_basicsize, tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       py_editor_dealloc, /*   destructor tp_dealloc;  */
+       NULL, /*        printfunc tp_print;     */
+       NULL, /*        getattrfunc tp_getattr; */
+       NULL, /*        setattrfunc tp_setattr; */
+       NULL, /*        cmpfunc tp_compare;     */
+       NULL, /*        reprfunc tp_repr;       */
+       
+       /* Method suites for standard classes */
+       
+       NULL, /*        PyNumberMethods *tp_as_number;  */
+       NULL, /*        PySequenceMethods *tp_as_sequence;      */
+       NULL, /*        PyMappingMethods *tp_as_mapping;        */
+       
+       /* More standard operations (here for binary compatibility) */
+       
+       NULL, /*        hashfunc tp_hash;       */
+       NULL, /*        ternaryfunc tp_call;    */
+       NULL, /*        reprfunc tp_str;        */
+       NULL, /*        getattrofunc tp_getattro;       */
+       NULL, /*        setattrofunc tp_setattro;       */
+       
+       /* Functions to access object as input/output buffer */
+       NULL, /*        PyBufferProcs *tp_as_buffer;    */
+       
+       /* Flags to define presence of optional/expanded features */
+       0, /*   long tp_flags;  */
+       
+       NULL, /*        const char *tp_doc;  Documentation string */
+       
+       /* Assigned meaning in release 2.0 */
+       /* call function for all accessible objects */
+       NULL, /*        traverseproc tp_traverse;       */
+       
+       /* delete references to contained objects */
+       NULL, /*        inquiry tp_clear;       */
+       
+       /* Assigned meaning in release 2.1 */
+       /* rich comparisons */
+       NULL, /*        richcmpfunc tp_richcompare;     */
+       
+       /* weak reference enabler */
+       0, /*   Py_ssize_t tp_weaklistoffset;   */
+       
+       /* Added in release 2.2 */
+       /* Iterators */
+       NULL, /*        getiterfunc tp_iter;    */
+       NULL, /*        iternextfunc tp_iternext;       */
+       
+       /* Attribute descriptor and subclassing stuff */
+       py_editor_methods, /*   struct PyMethodDef *tp_methods; */
 };
 
 
diff --git a/ra.c b/ra.c
index c295d8a461c60588a69720fe33cd49e31f77bdd3..63c56ec4e8e0dc5e170181f360f3b9b4f9339a44 100644 (file)
--- a/ra.c
+++ b/ra.c
@@ -206,10 +206,63 @@ static void reporter_dealloc(PyObject *self)
 
 PyTypeObject Reporter_Type = {
        PyObject_HEAD_INIT(NULL) 0,
-       .tp_name = "ra.Reporter",
-       .tp_basicsize = sizeof(ReporterObject),
-       .tp_methods = reporter_methods,
-       .tp_dealloc = reporter_dealloc,
+       "ra.Reporter", /*       const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(ReporterObject), 
+       0,/*    Py_ssize_t tp_basicsize, tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       reporter_dealloc, /*    destructor tp_dealloc;  */
+       NULL, /*        printfunc tp_print;     */
+       NULL, /*        getattrfunc tp_getattr; */
+       NULL, /*        setattrfunc tp_setattr; */
+       NULL, /*        cmpfunc tp_compare;     */
+       NULL, /*        reprfunc tp_repr;       */
+       
+       /* Method suites for standard classes */
+       
+       NULL, /*        PyNumberMethods *tp_as_number;  */
+       NULL, /*        PySequenceMethods *tp_as_sequence;      */
+       NULL, /*        PyMappingMethods *tp_as_mapping;        */
+       
+       /* More standard operations (here for binary compatibility) */
+       
+       NULL, /*        hashfunc tp_hash;       */
+       NULL, /*        ternaryfunc tp_call;    */
+       NULL, /*        reprfunc tp_str;        */
+       NULL, /*        getattrofunc tp_getattro;       */
+       NULL, /*        setattrofunc tp_setattro;       */
+       
+       /* Functions to access object as input/output buffer */
+       NULL, /*        PyBufferProcs *tp_as_buffer;    */
+       
+       /* Flags to define presence of optional/expanded features */
+       0, /*   long tp_flags;  */
+       
+       NULL, /*        const char *tp_doc;  Documentation string */
+       
+       /* Assigned meaning in release 2.0 */
+       /* call function for all accessible objects */
+       NULL, /*        traverseproc tp_traverse;       */
+       
+       /* delete references to contained objects */
+       NULL, /*        inquiry tp_clear;       */
+       
+       /* Assigned meaning in release 2.1 */
+       /* rich comparisons */
+       NULL, /*        richcmpfunc tp_richcompare;     */
+       
+       /* weak reference enabler */
+       0, /*   Py_ssize_t tp_weaklistoffset;   */
+       
+       /* Added in release 2.2 */
+       /* Iterators */
+       NULL, /*        getiterfunc tp_iter;    */
+       NULL, /*        iternextfunc tp_iternext;       */
+       
+       /* Attribute descriptor and subclassing stuff */
+       reporter_methods, /*    struct PyMethodDef *tp_methods; */
+
 };
 
 /**
@@ -450,22 +503,22 @@ static svn_error_t *py_cb_editor_abort_edit(void *edit_baton, apr_pool_t *pool)
 }
 
 static const svn_delta_editor_t py_editor = {
-       .set_target_revision = py_cb_editor_set_target_revision,
-       .open_root = py_cb_editor_open_root,
-       .delete_entry = py_cb_editor_delete_entry,
-       .add_directory = py_cb_editor_add_directory,
-       .open_directory = py_cb_editor_open_directory,
-       .change_dir_prop = py_cb_editor_change_prop,
-       .close_directory = py_cb_editor_close_directory,
-       .absent_directory = py_cb_editor_absent_directory,
-       .add_file = py_cb_editor_add_file,
-       .open_file = py_cb_editor_open_file,
-       .apply_textdelta = py_cb_editor_apply_textdelta,
-       .change_file_prop = py_cb_editor_change_prop,
-       .close_file = py_cb_editor_close_file,
-       .absent_file = py_cb_editor_absent_file,
-       .close_edit = py_cb_editor_close_edit,
-       .abort_edit = py_cb_editor_abort_edit
+       py_cb_editor_set_target_revision,
+       py_cb_editor_open_root,
+       py_cb_editor_delete_entry,
+       py_cb_editor_add_directory,
+       py_cb_editor_open_directory,
+       py_cb_editor_change_prop,
+       py_cb_editor_close_directory,
+       py_cb_editor_absent_directory,
+       py_cb_editor_add_file,
+       py_cb_editor_open_file,
+       py_cb_editor_apply_textdelta,
+       py_cb_editor_change_prop,
+       py_cb_editor_close_file,
+       py_cb_editor_absent_file,
+       py_cb_editor_close_edit,
+       py_cb_editor_abort_edit
 };
 
 static svn_error_t *py_file_rev_handler(void *baton, const char *path, svn_revnum_t rev, apr_hash_t *rev_props, svn_txdelta_window_handler_t *delta_handler, void **delta_baton, apr_array_header_t *prop_diffs, apr_pool_t *pool)
@@ -1566,15 +1619,74 @@ static PyMemberDef ra_members[] = {
 };
 
 PyTypeObject RemoteAccess_Type = {
-       PyObject_HEAD_INIT(&PyType_Type) 0,
-       .tp_name = "ra.RemoteAccess",
-       .tp_basicsize = sizeof(RemoteAccessObject),
-       .tp_new = ra_new,
-       .tp_dealloc = ra_dealloc,
-       .tp_repr = ra_repr,
-       .tp_methods = ra_methods,
-       .tp_getset = ra_getsetters,
-       .tp_members = ra_members,
+       PyObject_HEAD_INIT(NULL) 0,
+       "ra.RemoteAccess", /*   const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(RemoteAccessObject), 
+       0,/*    Py_ssize_t tp_basicsize, tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       ra_dealloc, /*  destructor tp_dealloc;  */
+       NULL, /*        printfunc tp_print;     */
+       NULL, /*        getattrfunc tp_getattr; */
+       NULL, /*        setattrfunc tp_setattr; */
+       NULL, /*        cmpfunc tp_compare;     */
+       ra_repr, /*     reprfunc tp_repr;       */
+       
+       /* Method suites for standard classes */
+       
+       NULL, /*        PyNumberMethods *tp_as_number;  */
+       NULL, /*        PySequenceMethods *tp_as_sequence;      */
+       NULL, /*        PyMappingMethods *tp_as_mapping;        */
+       
+       /* More standard operations (here for binary compatibility) */
+       
+       NULL, /*        hashfunc tp_hash;       */
+       NULL, /*        ternaryfunc tp_call;    */
+       NULL, /*        reprfunc tp_str;        */
+       NULL, /*        getattrofunc tp_getattro;       */
+       NULL, /*        setattrofunc tp_setattro;       */
+       
+       /* Functions to access object as input/output buffer */
+       NULL, /*        PyBufferProcs *tp_as_buffer;    */
+       
+       /* Flags to define presence of optional/expanded features */
+       0, /*   long tp_flags;  */
+       
+       NULL, /*        const char *tp_doc;  Documentation string */
+       
+       /* Assigned meaning in release 2.0 */
+       /* call function for all accessible objects */
+       NULL, /*        traverseproc tp_traverse;       */
+       
+       /* delete references to contained objects */
+       NULL, /*        inquiry tp_clear;       */
+       
+       /* Assigned meaning in release 2.1 */
+       /* rich comparisons */
+       NULL, /*        richcmpfunc tp_richcompare;     */
+       
+       /* weak reference enabler */
+       0, /*   Py_ssize_t tp_weaklistoffset;   */
+       
+       /* Added in release 2.2 */
+       /* Iterators */
+       NULL, /*        getiterfunc tp_iter;    */
+       NULL, /*        iternextfunc tp_iternext;       */
+       
+       /* Attribute descriptor and subclassing stuff */
+       ra_methods, /*  struct PyMethodDef *tp_methods; */
+       ra_members, /*  struct PyMemberDef *tp_members; */
+       ra_getsetters, /*       struct PyGetSetDef *tp_getset;  */
+       NULL, /*        struct _typeobject *tp_base;    */
+       NULL, /*        PyObject *tp_dict;      */
+       NULL, /*        descrgetfunc tp_descr_get;      */
+       NULL, /*        descrsetfunc tp_descr_set;      */
+       0, /*   Py_ssize_t tp_dictoffset;       */
+       NULL, /*        initproc tp_init;       */
+       NULL, /*        allocfunc tp_alloc;     */
+       ra_new, /*      newfunc tp_new; */
+
 };
 
 typedef struct { 
@@ -1591,10 +1703,15 @@ static void auth_provider_dealloc(PyObject *self)
 }
 
 PyTypeObject AuthProvider_Type = { 
-       PyObject_HEAD_INIT(&PyType_Type) 0,
-       .tp_name = "ra.AuthProvider",
-       .tp_basicsize = sizeof(AuthProviderObject),
-       .tp_dealloc = auth_provider_dealloc,
+       PyObject_HEAD_INIT(NULL) 0,
+       "ra.AuthProvider", /*   const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(AuthProviderObject), 
+       0,/*    Py_ssize_t tp_basicsize, tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       auth_provider_dealloc, /*       destructor tp_dealloc;  */
+
 };
 
 static PyObject *auth_init(PyTypeObject *type, PyObject *args, PyObject *kwargs)
@@ -1771,12 +1888,61 @@ static PyObject *credentials_iter_next(CredentialsIterObject *iterator)
 }
 
 PyTypeObject CredentialsIter_Type = {
-       PyObject_HEAD_INIT(&PyType_Type) 0,
-       .tp_basicsize = sizeof(CredentialsIterObject),
-       .tp_dealloc = (destructor)credentials_iter_dealloc,
-       .tp_name = "ra.CredentialsIter",
-       .tp_iter = PyObject_SelfIter,
-       .tp_iternext = (iternextfunc)credentials_iter_next,
+       PyObject_HEAD_INIT(NULL) 0,
+       "ra.CredentialsIter", /*        const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(CredentialsIterObject), 
+       0,/*    Py_ssize_t tp_basicsize, tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       (destructor)credentials_iter_dealloc, /*        destructor tp_dealloc;  */
+       NULL, /*        printfunc tp_print;     */
+       NULL, /*        getattrfunc tp_getattr; */
+       NULL, /*        setattrfunc tp_setattr; */
+       NULL, /*        cmpfunc tp_compare;     */
+       NULL, /*        reprfunc tp_repr;       */
+       
+       /* Method suites for standard classes */
+       
+       NULL, /*        PyNumberMethods *tp_as_number;  */
+       NULL, /*        PySequenceMethods *tp_as_sequence;      */
+       NULL, /*        PyMappingMethods *tp_as_mapping;        */
+       
+       /* More standard operations (here for binary compatibility) */
+       
+       NULL, /*        hashfunc tp_hash;       */
+       NULL, /*        ternaryfunc tp_call;    */
+       NULL, /*        reprfunc tp_str;        */
+       NULL, /*        getattrofunc tp_getattro;       */
+       NULL, /*        setattrofunc tp_setattro;       */
+       
+       /* Functions to access object as input/output buffer */
+       NULL, /*        PyBufferProcs *tp_as_buffer;    */
+       
+       /* Flags to define presence of optional/expanded features */
+       0, /*   long tp_flags;  */
+       
+       NULL, /*        const char *tp_doc;  Documentation string */
+       
+       /* Assigned meaning in release 2.0 */
+       /* call function for all accessible objects */
+       NULL, /*        traverseproc tp_traverse;       */
+       
+       /* delete references to contained objects */
+       NULL, /*        inquiry tp_clear;       */
+       
+       /* Assigned meaning in release 2.1 */
+       /* rich comparisons */
+       NULL, /*        richcmpfunc tp_richcompare;     */
+       
+       /* weak reference enabler */
+       0, /*   Py_ssize_t tp_weaklistoffset;   */
+       
+       /* Added in release 2.2 */
+       /* Iterators */
+       NULL, /*        getiterfunc tp_iter;    */
+       (iternextfunc)credentials_iter_next, /* iternextfunc tp_iternext;       */
+
 };
 
 static PyMethodDef auth_methods[] = {
@@ -1794,12 +1960,74 @@ static void auth_dealloc(PyObject *self)
 }
 
 PyTypeObject Auth_Type = {
-       PyObject_HEAD_INIT(&PyType_Type) 0,
-       .tp_new = auth_init,
-       .tp_basicsize = sizeof(AuthObject),
-       .tp_dealloc = auth_dealloc,
-       .tp_name = "ra.Auth",
-       .tp_methods = auth_methods,
+       PyObject_HEAD_INIT(NULL) 0,
+       "ra.Auth", /*   const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(AuthObject), 
+       0,/*    Py_ssize_t tp_basicsize, tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       auth_dealloc, /*        destructor tp_dealloc;  */
+       NULL, /*        printfunc tp_print;     */
+       NULL, /*        getattrfunc tp_getattr; */
+       NULL, /*        setattrfunc tp_setattr; */
+       NULL, /*        cmpfunc tp_compare;     */
+       NULL, /*        reprfunc tp_repr;       */
+       
+       /* Method suites for standard classes */
+       
+       NULL, /*        PyNumberMethods *tp_as_number;  */
+       NULL, /*        PySequenceMethods *tp_as_sequence;      */
+       NULL, /*        PyMappingMethods *tp_as_mapping;        */
+       
+       /* More standard operations (here for binary compatibility) */
+       
+       NULL, /*        hashfunc tp_hash;       */
+       NULL, /*        ternaryfunc tp_call;    */
+       NULL, /*        reprfunc tp_str;        */
+       NULL, /*        getattrofunc tp_getattro;       */
+       NULL, /*        setattrofunc tp_setattro;       */
+       
+       /* Functions to access object as input/output buffer */
+       NULL, /*        PyBufferProcs *tp_as_buffer;    */
+       
+       /* Flags to define presence of optional/expanded features */
+       0, /*   long tp_flags;  */
+       
+       NULL, /*        const char *tp_doc;  Documentation string */
+       
+       /* Assigned meaning in release 2.0 */
+       /* call function for all accessible objects */
+       NULL, /*        traverseproc tp_traverse;       */
+       
+       /* delete references to contained objects */
+       NULL, /*        inquiry tp_clear;       */
+       
+       /* Assigned meaning in release 2.1 */
+       /* rich comparisons */
+       NULL, /*        richcmpfunc tp_richcompare;     */
+       
+       /* weak reference enabler */
+       0, /*   Py_ssize_t tp_weaklistoffset;   */
+       
+       /* Added in release 2.2 */
+       /* Iterators */
+       NULL, /*        getiterfunc tp_iter;    */
+       NULL, /*        iternextfunc tp_iternext;       */
+       
+       /* Attribute descriptor and subclassing stuff */
+       auth_methods, /*        struct PyMethodDef *tp_methods; */
+       NULL, /*        struct PyMemberDef *tp_members; */
+       NULL, /*        struct PyGetSetDef *tp_getset;  */
+       NULL, /*        struct _typeobject *tp_base;    */
+       NULL, /*        PyObject *tp_dict;      */
+       NULL, /*        descrgetfunc tp_descr_get;      */
+       NULL, /*        descrsetfunc tp_descr_set;      */
+       0, /*   Py_ssize_t tp_dictoffset;       */
+       NULL, /*        initproc tp_init;       */
+       NULL, /*        allocfunc tp_alloc;     */
+       auth_init, /*   newfunc tp_new; */
+
 };
 
 static svn_error_t *py_username_prompt(svn_auth_cred_username_t **cred, void *baton, const char *realm, int may_save, apr_pool_t *pool)
diff --git a/repos.c b/repos.c
index 747d245d288a96d4256bf07ee0326268802d8861..eb673f538bb60e1916fce90c4f25b7609d36cf22 100644 (file)
--- a/repos.c
+++ b/repos.c
@@ -159,10 +159,63 @@ static void fs_dealloc(PyObject *self)
 
 PyTypeObject FileSystem_Type = {
        PyObject_HEAD_INIT(NULL) 0,
-       .tp_name = "repos.FileSystem",
-       .tp_basicsize = sizeof(FileSystemObject),
-       .tp_dealloc = fs_dealloc,
-       .tp_methods = fs_methods,
+       "repos.FileSystem", /*  const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(FileSystemObject), 
+       0,/*    Py_ssize_t tp_basicsize, tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       fs_dealloc, /*  destructor tp_dealloc;  */
+       NULL, /*        printfunc tp_print;     */
+       NULL, /*        getattrfunc tp_getattr; */
+       NULL, /*        setattrfunc tp_setattr; */
+       NULL, /*        cmpfunc tp_compare;     */
+       NULL, /*        reprfunc tp_repr;       */
+       
+       /* Method suites for standard classes */
+       
+       NULL, /*        PyNumberMethods *tp_as_number;  */
+       NULL, /*        PySequenceMethods *tp_as_sequence;      */
+       NULL, /*        PyMappingMethods *tp_as_mapping;        */
+       
+       /* More standard operations (here for binary compatibility) */
+       
+       NULL, /*        hashfunc tp_hash;       */
+       NULL, /*        ternaryfunc tp_call;    */
+       NULL, /*        reprfunc tp_str;        */
+       NULL, /*        getattrofunc tp_getattro;       */
+       NULL, /*        setattrofunc tp_setattro;       */
+       
+       /* Functions to access object as input/output buffer */
+       NULL, /*        PyBufferProcs *tp_as_buffer;    */
+       
+       /* Flags to define presence of optional/expanded features */
+       0, /*   long tp_flags;  */
+       
+       NULL, /*        const char *tp_doc;  Documentation string */
+       
+       /* Assigned meaning in release 2.0 */
+       /* call function for all accessible objects */
+       NULL, /*        traverseproc tp_traverse;       */
+       
+       /* delete references to contained objects */
+       NULL, /*        inquiry tp_clear;       */
+       
+       /* Assigned meaning in release 2.1 */
+       /* rich comparisons */
+       NULL, /*        richcmpfunc tp_richcompare;     */
+       
+       /* weak reference enabler */
+       0, /*   Py_ssize_t tp_weaklistoffset;   */
+       
+       /* Added in release 2.2 */
+       /* Iterators */
+       NULL, /*        getiterfunc tp_iter;    */
+       NULL, /*        iternextfunc tp_iternext;       */
+       
+       /* Attribute descriptor and subclassing stuff */
+       fs_methods, /*  struct PyMethodDef *tp_methods; */
+
 };
 
 static PyObject *repos_load_fs(PyObject *self, PyObject *args, PyObject *kwargs)
@@ -209,12 +262,74 @@ static PyMethodDef repos_methods[] = {
 };
 
 PyTypeObject Repository_Type = {
-       PyObject_HEAD_INIT(&PyType_Type) 0,
-       .tp_name = "repos.Repository",
-       .tp_basicsize = sizeof(RepositoryObject),
-       .tp_dealloc = repos_dealloc,
-       .tp_methods = repos_methods,
-       .tp_new = repos_init,
+       PyObject_HEAD_INIT(NULL) 0,
+       "repos.Repository", /*  const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(RepositoryObject), 
+       0,/*    Py_ssize_t tp_basicsize, tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       repos_dealloc, /*       destructor tp_dealloc;  */
+       NULL, /*        printfunc tp_print;     */
+       NULL, /*        getattrfunc tp_getattr; */
+       NULL, /*        setattrfunc tp_setattr; */
+       NULL, /*        cmpfunc tp_compare;     */
+       NULL, /*        reprfunc tp_repr;       */
+       
+       /* Method suites for standard classes */
+       
+       NULL, /*        PyNumberMethods *tp_as_number;  */
+       NULL, /*        PySequenceMethods *tp_as_sequence;      */
+       NULL, /*        PyMappingMethods *tp_as_mapping;        */
+       
+       /* More standard operations (here for binary compatibility) */
+       
+       NULL, /*        hashfunc tp_hash;       */
+       NULL, /*        ternaryfunc tp_call;    */
+       NULL, /*        reprfunc tp_str;        */
+       NULL, /*        getattrofunc tp_getattro;       */
+       NULL, /*        setattrofunc tp_setattro;       */
+       
+       /* Functions to access object as input/output buffer */
+       NULL, /*        PyBufferProcs *tp_as_buffer;    */
+       
+       /* Flags to define presence of optional/expanded features */
+       0, /*   long tp_flags;  */
+       
+       NULL, /*        const char *tp_doc;  Documentation string */
+       
+       /* Assigned meaning in release 2.0 */
+       /* call function for all accessible objects */
+       NULL, /*        traverseproc tp_traverse;       */
+       
+       /* delete references to contained objects */
+       NULL, /*        inquiry tp_clear;       */
+       
+       /* Assigned meaning in release 2.1 */
+       /* rich comparisons */
+       NULL, /*        richcmpfunc tp_richcompare;     */
+       
+       /* weak reference enabler */
+       0, /*   Py_ssize_t tp_weaklistoffset;   */
+       
+       /* Added in release 2.2 */
+       /* Iterators */
+       NULL, /*        getiterfunc tp_iter;    */
+       NULL, /*        iternextfunc tp_iternext;       */
+       
+       /* Attribute descriptor and subclassing stuff */
+       repos_methods, /*       struct PyMethodDef *tp_methods; */
+       NULL, /*        struct PyMemberDef *tp_members; */
+       NULL, /*        struct PyGetSetDef *tp_getset;  */
+       NULL, /*        struct _typeobject *tp_base;    */
+       NULL, /*        PyObject *tp_dict;      */
+       NULL, /*        descrgetfunc tp_descr_get;      */
+       NULL, /*        descrsetfunc tp_descr_set;      */
+       0, /*   Py_ssize_t tp_dictoffset;       */
+       NULL, /*        initproc tp_init;       */
+       NULL, /*        allocfunc tp_alloc;     */
+       repos_init, /*  newfunc tp_new; */
+
 };
 
 void initrepos(void)
diff --git a/wc.c b/wc.c
index 9e50b9a639818efa2067f4bdd04c3b6eda7ff49d..142ebe7b6001a28a3095281146defd003f445563 100644 (file)
--- a/wc.c
+++ b/wc.c
@@ -86,11 +86,11 @@ static svn_error_t *py_ra_report_abort(void *baton, apr_pool_t *pool)
 }
 
 static const svn_ra_reporter2_t py_ra_reporter = {
-       .finish_report = py_ra_report_finish,
-       .abort_report = py_ra_report_abort,
-       .link_path = py_ra_report_link_path,
-       .delete_path = py_ra_report_delete_path,
-       .set_path = py_ra_report_set_path,
+       py_ra_report_set_path,
+       py_ra_report_delete_path,
+       py_ra_report_link_path,
+       py_ra_report_finish,
+       py_ra_report_abort,
 };
 
 
@@ -117,7 +117,7 @@ static svn_error_t *py_wc_found_entry(const char *path, const svn_wc_entry_t *en
 }
 
 static svn_wc_entry_callbacks_t py_wc_entry_callbacks = {
-       .found_entry = py_wc_found_entry
+       py_wc_found_entry
 };
 
 void py_wc_notify_func(void *baton, const svn_wc_notify_t *notify, apr_pool_t *pool)
@@ -158,11 +158,65 @@ static PyMemberDef entry_members[] = {
 };
 
 PyTypeObject Entry_Type = {
-       PyObject_HEAD_INIT(&PyType_Type) 0,
-       .tp_name = "wc.Entry",
-       .tp_basicsize = sizeof(EntryObject),
-       .tp_dealloc = entry_dealloc,
-       .tp_members = entry_members,
+       PyObject_HEAD_INIT(NULL) 0,
+       "wc.Entry", /*  const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(EntryObject), 
+       0,/*    Py_ssize_t tp_basicsize, tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       entry_dealloc, /*       destructor tp_dealloc;  */
+       NULL, /*        printfunc tp_print;     */
+       NULL, /*        getattrfunc tp_getattr; */
+       NULL, /*        setattrfunc tp_setattr; */
+       NULL, /*        cmpfunc tp_compare;     */
+       NULL, /*        reprfunc tp_repr;       */
+       
+       /* Method suites for standard classes */
+       
+       NULL, /*        PyNumberMethods *tp_as_number;  */
+       NULL, /*        PySequenceMethods *tp_as_sequence;      */
+       NULL, /*        PyMappingMethods *tp_as_mapping;        */
+       
+       /* More standard operations (here for binary compatibility) */
+       
+       NULL, /*        hashfunc tp_hash;       */
+       NULL, /*        ternaryfunc tp_call;    */
+       NULL, /*        reprfunc tp_str;        */
+       NULL, /*        getattrofunc tp_getattro;       */
+       NULL, /*        setattrofunc tp_setattro;       */
+       
+       /* Functions to access object as input/output buffer */
+       NULL, /*        PyBufferProcs *tp_as_buffer;    */
+       
+       /* Flags to define presence of optional/expanded features */
+       0, /*   long tp_flags;  */
+       
+       NULL, /*        const char *tp_doc;  Documentation string */
+       
+       /* Assigned meaning in release 2.0 */
+       /* call function for all accessible objects */
+       NULL, /*        traverseproc tp_traverse;       */
+       
+       /* delete references to contained objects */
+       NULL, /*        inquiry tp_clear;       */
+       
+       /* Assigned meaning in release 2.1 */
+       /* rich comparisons */
+       NULL, /*        richcmpfunc tp_richcompare;     */
+       
+       /* weak reference enabler */
+       0, /*   Py_ssize_t tp_weaklistoffset;   */
+       
+       /* Added in release 2.2 */
+       /* Iterators */
+       NULL, /*        getiterfunc tp_iter;    */
+       NULL, /*        iternextfunc tp_iternext;       */
+       
+       /* Attribute descriptor and subclassing stuff */
+       NULL, /*        struct PyMethodDef *tp_methods; */
+       entry_members, /*       struct PyMemberDef *tp_members; */
+
 };
 
 static PyObject *py_entry(const svn_wc_entry_t *entry)
@@ -615,12 +669,74 @@ static PyMethodDef adm_methods[] = {
 };
 
 PyTypeObject Adm_Type = {
-       PyObject_HEAD_INIT(&PyType_Type) 0,
-       .tp_name = "wc.WorkingCopy",
-       .tp_basicsize = sizeof(AdmObject),
-       .tp_new = adm_init,
-       .tp_dealloc = adm_dealloc,
-       .tp_methods = adm_methods,
+       PyObject_HEAD_INIT(NULL) 0,
+       "wc.WorkingCopy", /*    const char *tp_name;  For printing, in format "<module>.<name>" */
+       sizeof(AdmObject), 
+       0,/*    Py_ssize_t tp_basicsize, tp_itemsize;  For allocation */
+       
+       /* Methods to implement standard operations */
+       
+       adm_dealloc, /* destructor tp_dealloc;  */
+       NULL, /*        printfunc tp_print;     */
+       NULL, /*        getattrfunc tp_getattr; */
+       NULL, /*        setattrfunc tp_setattr; */
+       NULL, /*        cmpfunc tp_compare;     */
+       NULL, /*        reprfunc tp_repr;       */
+       
+       /* Method suites for standard classes */
+       
+       NULL, /*        PyNumberMethods *tp_as_number;  */
+       NULL, /*        PySequenceMethods *tp_as_sequence;      */
+       NULL, /*        PyMappingMethods *tp_as_mapping;        */
+       
+       /* More standard operations (here for binary compatibility) */
+       
+       NULL, /*        hashfunc tp_hash;       */
+       NULL, /*        ternaryfunc tp_call;    */
+       NULL, /*        reprfunc tp_str;        */
+       NULL, /*        getattrofunc tp_getattro;       */
+       NULL, /*        setattrofunc tp_setattro;       */
+       
+       /* Functions to access object as input/output buffer */
+       NULL, /*        PyBufferProcs *tp_as_buffer;    */
+       
+       /* Flags to define presence of optional/expanded features */
+       0, /*   long tp_flags;  */
+       
+       NULL, /*        const char *tp_doc;  Documentation string */
+       
+       /* Assigned meaning in release 2.0 */
+       /* call function for all accessible objects */
+       NULL, /*        traverseproc tp_traverse;       */
+       
+       /* delete references to contained objects */
+       NULL, /*        inquiry tp_clear;       */
+       
+       /* Assigned meaning in release 2.1 */
+       /* rich comparisons */
+       NULL, /*        richcmpfunc tp_richcompare;     */
+       
+       /* weak reference enabler */
+       0, /*   Py_ssize_t tp_weaklistoffset;   */
+       
+       /* Added in release 2.2 */
+       /* Iterators */
+       NULL, /*        getiterfunc tp_iter;    */
+       NULL, /*        iternextfunc tp_iternext;       */
+       
+       /* Attribute descriptor and subclassing stuff */
+       adm_methods, /* struct PyMethodDef *tp_methods; */
+       NULL, /*        struct PyMemberDef *tp_members; */
+       NULL, /*        struct PyGetSetDef *tp_getset;  */
+       NULL, /*        struct _typeobject *tp_base;    */
+       NULL, /*        PyObject *tp_dict;      */
+       NULL, /*        descrgetfunc tp_descr_get;      */
+       NULL, /*        descrsetfunc tp_descr_set;      */
+       0, /*   Py_ssize_t tp_dictoffset;       */
+       NULL, /*        initproc tp_init;       */
+       NULL, /*        allocfunc tp_alloc;     */
+       adm_init, /*    newfunc tp_new; */
+
 };
 
 /**