summaryrefslogtreecommitdiff
path: root/src/pl/plpython/plpy_plpymodule.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2018-08-29 08:36:30 +0200
committerPeter Eisentraut <peter_e@gmx.net>2018-09-07 11:40:03 +0200
commit98afa68d935215e8ab2c7de7fb45972a03e3da26 (patch)
treeded48d64b8a9e943a5ea82de6675952d7050aa45 /src/pl/plpython/plpy_plpymodule.c
parent75f7855369ec56d4a8e7d6eae98aff1182b85cac (diff)
Use C99 designated initializers for some structs
These are just a few particularly egregious cases that were hard to read and write, and error prone because of many similar adjacent types. Discussion: https://www.postgresql.org/message-id/flat/4c9f01be-9245-2148-b569-61a8562ef190%402ndquadrant.com
Diffstat (limited to 'src/pl/plpython/plpy_plpymodule.c')
-rw-r--r--src/pl/plpython/plpy_plpymodule.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/pl/plpython/plpy_plpymodule.c b/src/pl/plpython/plpy_plpymodule.c
index c55cd959c29..23e49e4b754 100644
--- a/src/pl/plpython/plpy_plpymodule.c
+++ b/src/pl/plpython/plpy_plpymodule.c
@@ -115,23 +115,17 @@ static PyMethodDef PLy_exc_methods[] = {
#if PY_MAJOR_VERSION >= 3
static PyModuleDef PLy_module = {
- PyModuleDef_HEAD_INIT, /* m_base */
- "plpy", /* m_name */
- NULL, /* m_doc */
- -1, /* m_size */
- PLy_methods, /* m_methods */
+ PyModuleDef_HEAD_INIT,
+ .m_name = "plpy",
+ .m_size = -1,
+ .m_methods = PLy_methods,
};
static PyModuleDef PLy_exc_module = {
- PyModuleDef_HEAD_INIT, /* m_base */
- "spiexceptions", /* m_name */
- NULL, /* m_doc */
- -1, /* m_size */
- PLy_exc_methods, /* m_methods */
- NULL, /* m_reload */
- NULL, /* m_traverse */
- NULL, /* m_clear */
- NULL /* m_free */
+ PyModuleDef_HEAD_INIT,
+ .m_name = "spiexceptions",
+ .m_size = -1,
+ .m_methods = PLy_exc_methods,
};
/*