Skip to content

Commit

Permalink
stick to naming convention with LDAPinit_pkginfo()
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder authored and Petr Viktorin committed Nov 22, 2017
1 parent 5b35eef commit 082490a
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Modules/ldapmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 082490a

Please sign in to comment.