From 082490a0b129619f873bfcadb17bf0bef244bf89 Mon Sep 17 00:00:00 2001 From: stroeder Date: Sat, 18 Nov 2017 15:32:36 +0000 Subject: [PATCH] stick to naming convention with LDAPinit_pkginfo() --- Modules/ldapmodule.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Modules/ldapmodule.c b/Modules/ldapmodule.c index dc954d4..a788ae1 100644 --- a/Modules/ldapmodule.c +++ b/Modules/ldapmodule.c @@ -16,24 +16,23 @@ static char author_str[] = STR(LDAPMODULE_AUTHOR); static char license_str[] = STR(LDAPMODULE_LICENSE); void -init_pkginfo( PyObject* d ) +LDAPinit_pkginfo( PyObject* d ) { PyObject *version; PyObject *author; PyObject *license; version = PyString_FromString(version_str); - PyDict_SetItemString( d, "__version__", version ); - Py_DECREF(version); - - author = PyString_FromString(author_str); - PyDict_SetItemString(d, "__author__", author); - Py_DECREF(author); + author = PyString_FromString(author_str); + license = PyString_FromString(license_str); - license = PyString_FromString(license_str); - PyDict_SetItemString(d, "__license__", license); - Py_DECREF(license); + PyDict_SetItemString( d, "__version__", version ); + PyDict_SetItemString(d, "__author__", author); + PyDict_SetItemString(d, "__license__", license); + Py_DECREF(version); + Py_DECREF(author); + Py_DECREF(license); } DL_EXPORT(void) init_ldap(void); @@ -61,7 +60,7 @@ init_ldap() /* Add some symbolic constants to the module */ d = PyModule_GetDict(m); - init_pkginfo(d); + LDAPinit_pkginfo(d); LDAPinit_constants(d); LDAPinit_errors(d); LDAPinit_functions(d);