1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

lib:tdb: Use C99 initializer for PyGetSetDef in pytdb

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Andreas Schneider 2018-12-13 11:29:09 +01:00 committed by Andreas Schneider
parent 0a6f78d736
commit 651ee7f205

View File

@ -599,24 +599,40 @@ static PyObject *obj_get_text(PyTdbObject *self, void *closure)
} }
static PyGetSetDef tdb_object_getsetters[] = { static PyGetSetDef tdb_object_getsetters[] = {
{ discard_const_p(char, "hash_size"), {
(getter)obj_get_hash_size, NULL, NULL }, .name = discard_const_p(char, "hash_size"),
{ discard_const_p(char, "map_size"), .get = (getter)obj_get_hash_size,
(getter)obj_get_map_size, NULL, NULL }, },
{ discard_const_p(char, "freelist_size"), {
(getter)obj_get_freelist_size, NULL, NULL }, .name = discard_const_p(char, "map_size"),
{ discard_const_p(char, "flags"), .get = (getter)obj_get_map_size,
(getter)obj_get_flags, NULL, NULL }, },
{ discard_const_p(char, "max_dead"), {
NULL, (setter)obj_set_max_dead, NULL }, .name = discard_const_p(char, "freelist_size"),
{ discard_const_p(char, "filename"), .get = (getter)obj_get_freelist_size,
(getter)obj_get_filename, NULL, },
discard_const_p(char, "The filename of this TDB file.") }, {
{ discard_const_p(char, "seqnum"), .name = discard_const_p(char, "flags"),
(getter)obj_get_seqnum, NULL, NULL }, .get = (getter)obj_get_flags,
{ discard_const_p(char, "text"), },
(getter)obj_get_text, NULL, NULL }, {
{ NULL } .name = discard_const_p(char, "max_dead"),
.set = (setter)obj_set_max_dead,
},
{
.name = discard_const_p(char, "filename"),
.get = (getter)obj_get_filename,
.doc = discard_const_p(char, "The filename of this TDB file."),
},
{
.name = discard_const_p(char, "seqnum"),
.get = (getter)obj_get_seqnum,
},
{
.name = discard_const_p(char, "text"),
.get = (getter)obj_get_text,
},
{ .name = NULL }
}; };
static PyObject *tdb_object_repr(PyTdbObject *self) static PyObject *tdb_object_repr(PyTdbObject *self)