From 46b07ecaffc154aa7cc713409196020736fe4f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=93ZES=20=C3=81d=C3=A1m=20Istv=C3=A1n?= Date: Thu, 15 Oct 2015 10:08:03 +0200 Subject: [PATCH] python-dest: remove irrelevant initialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These initializations can be removed, because these members would be initialized to NULL implicitly. With these implicit initializations, no preprocessor checks are needed. Signed-off-by: MÓZES Ádám István --- modules/python/python-logmsg.c | 39 ---------------------------------- 1 file changed, 39 deletions(-) diff --git a/modules/python/python-logmsg.c b/modules/python/python-logmsg.c index 5463010cdc..ed811099a9 100644 --- a/modules/python/python-logmsg.c +++ b/modules/python/python-logmsg.c @@ -71,53 +71,14 @@ py_log_message_new(LogMessage *msg) static PyTypeObject py_log_message_type = { PyObject_HEAD_INIT(&PyType_Type) - - .ob_size = 0, .tp_name = "LogMessage", .tp_basicsize = sizeof(PyLogMessage), - .tp_itemsize = 0, .tp_dealloc = (destructor) py_log_message_free, - .tp_print = NULL, .tp_getattr = (getattrfunc) py_log_message_getattr, .tp_setattr = (setattrfunc) NULL, - .tp_compare = NULL, - .tp_repr = NULL, - .tp_as_number = NULL, - .tp_as_sequence = NULL, - .tp_as_mapping = NULL, - .tp_hash = NULL, - .tp_call = NULL, - .tp_str = NULL, - .tp_getattro = NULL, - .tp_setattro = NULL, - .tp_as_buffer = NULL, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_doc = "LogMessage class encapsulating a syslog-ng log message", - .tp_traverse = NULL, - .tp_clear = NULL, - .tp_richcompare = NULL, - .tp_weaklistoffset = 0, - .tp_iter = NULL, - .tp_iternext = NULL, - .tp_methods = NULL, - .tp_members = NULL, - .tp_getset = NULL, - .tp_base = NULL, - .tp_dict = NULL, - .tp_descr_get = NULL, - .tp_descr_set = NULL, - .tp_dictoffset = 0, - .tp_init = NULL, - .tp_alloc = NULL, .tp_new = PyType_GenericNew, - .tp_free = NULL, - .tp_is_gc = NULL, - .tp_bases = NULL, - .tp_mro = NULL, - .tp_cache = NULL, - .tp_subclasses = NULL, - .tp_weaklist = NULL, - .tp_del = NULL, }; void