Movatterモバイル変換


[0]ホーム

URL:


Wayback Machine
1 capture
23 Dec 2022
NovDECJan
Previous capture23Next capture
202120222023
success
fail
COLLECTED BY
TIMESTAMPS
loading
The Wayback Machine - https://web.archive.org/web/20221223110318/https://github.com/python/cpython/pull/778
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Use NULL rather than 0.#778

Merged
serhiy-storchaka merged 1 commit intopython:masterfromserhiy-storchaka:badzeroMar 23, 2017

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedMar 23, 2017

There was few cases of using literal 0 instead of NULL in the context of
pointers. While this was a legitimate C code, using NULL rather than 0 makes
the code clearer.

There was few cases of using literal 0 instead of NULL in the context ofpointers.  While this was a legitimate C code, using NULL rather than 0 makesthe code clearer.
@serhiy-storchakaserhiy-storchaka added the type-featureA feature request or enhancement labelMar 23, 2017
@mention-bot
Copy link

mention-bot commentedMar 23, 2017

@serhiy-storchaka, thanks for your PR! By analyzing the history of the files in this pull request, we identified@loewis,@benjaminp and@warsaw to be potential reviewers.

@@ -2179,7 +2179,7 @@ BOOL MyIsUserAnAdmin()
// to leave the library loaded)
if (0 == (shell32=LoadLibrary("shell32.dll")))
return FALSE;
if (0 == (pfnIsUserAnAdmin=(PFNIsUserAnAdmin)GetProcAddress(shell32, "IsUserAnAdmin")))
if (NULL == (pfnIsUserAnAdmin=(PFNIsUserAnAdmin)GetProcAddress(shell32, "IsUserAnAdmin")))
Copy link
Member

@warsawwarsawMar 23, 2017

Choose a reason for hiding this comment

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

I find it interesting that we sometimes useNULL == and other times use== NULL. I suppose it's not an inconsistency that matters a lot.

warsaw
warsaw approved these changesMar 23, 2017
@serhiy-storchakaserhiy-storchaka merged commit0b3ec19 intopython:masterMar 23, 2017
@serhiy-storchakaserhiy-storchaka deleted the badzero branchMar 23, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@warsawwarsaw

Assignees
No one assigned
Labels
type-featureA feature request or enhancement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

None yet

4 participants
@serhiy-storchaka@mention-bot@warsaw@the-knights-who-say-ni

[8]ページ先頭

©2009-2025 Movatter.jp