Skip to content

refactor: Merge all header files #541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

tiran
Copy link
Member

@tiran tiran commented Oct 30, 2023

Merge all header files except constants_generated.h into a single header file pythonldap.h. A single header file makes it far easier to port python-ldap to heap types and module state for Per-Interpreter GIL.

pythonldap.h uses new macros PYLDAP_FUNC and PYLDAP_DATA to declare functions and data, which are used across C files.

Remove unused macro streq.

Remove Python 2 vestiges from C and header files.

See: #540

tiran added 2 commits October 30, 2023 09:34
Merge all header files except `constants_generated.h` into a single
header file `pythonldap.h`. A single header file makes it far easier to
port python-ldap to heap types and module state for Per-Interpreter GIL.

`pythonldap.h` uses new macros `PYLDAP_FUNC` and `PYLDAP_DATA` to declare
functions and data, which are used across C files.

Remove unused macro `streq`.

See: python-ldap#540
Signed-off-by: Christian Heimes <cheimes@redhat.com>
The C code had a few version checks for Python 2. python-ldap requires
Python >= 3.6.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
Copy link
Contributor

@droideck droideck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@tiran tiran merged commit f481010 into python-ldap:main Nov 3, 2023
@tiran tiran deleted the issue540-merge-headers branch November 3, 2023 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants