Skip to content
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

bpo-32494: Add gdbm.count() #19569

Closed

Conversation

ZackerySpytz
Copy link
Contributor

@ZackerySpytz ZackerySpytz commented Apr 17, 2020

gdbm_count() was added in GDBM 1.11.

https://bugs.python.org/issue32494

gdbm_count() was added in GDBM 1.11.
Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

Thank you. This looks mostly good, just one comment.

{
gdbm_count_t count;
check_dbmobject_open(self);
if (gdbm_count(self->di_dbm, &count) == -1) {
Copy link
Member

Choose a reason for hiding this comment

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

Need to set errno = 0 before this.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Copy link
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

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

@ZackerySpytz @pitrou

Can we just replace the logic of dbm_length to use gdbm_count when the version is available?

dbm_length(dbmobject *dp)

if possible, we don't have to export a new method.

@pitrou
Copy link
Member

pitrou commented May 1, 2020

Superseded by PR #19814. Closing.

@pitrou pitrou closed this May 1, 2020
@sam-s sam-s mannequin mentioned this pull request Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants