Title: `Py_EnterRecursiveCall()`/`_Py_EnterRecursiveCall()` return value misused in a number of places · Issue #101965 · python/cpython · GitHub
Open Graph Title: `Py_EnterRecursiveCall()`/`_Py_EnterRecursiveCall()` return value misused in a number of places · Issue #101965 · python/cpython
X Title: `Py_EnterRecursiveCall()`/`_Py_EnterRecursiveCall()` return value misused in a number of places · Issue #101965 · python/cpython
Description: Using grep, I identified 3 instances in main where code checks if Py_EnterRecursiveCall(...) < 0 (which just returns _Py_EnterRecursiveCall(...)) or _Py_EnterRecursiveCall(...) < 0. Py_EnterRecursiveCall() documentation only guarantees t...
Open Graph Description: Using grep, I identified 3 instances in main where code checks if Py_EnterRecursiveCall(...) < 0 (which just returns _Py_EnterRecursiveCall(...)) or _Py_EnterRecursiveCall(...) < 0. Py_EnterRecursi...
X Description: Using grep, I identified 3 instances in main where code checks if Py_EnterRecursiveCall(...) < 0 (which just returns _Py_EnterRecursiveCall(...)) or _Py_EnterRecursiveCall(...) < 0. Py_EnterR...
Opengraph URL: https://github.com/python/cpython/issues/101965
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`Py_EnterRecursiveCall()`/`_Py_EnterRecursiveCall()` return value misused in a number of places","articleBody":"Using ``grep``, I identified 3 instances in `main` where code checks if ``Py_EnterRecursiveCall(...) \u003c 0`` (which just returns ``_Py_EnterRecursiveCall(...)``) or ``_Py_EnterRecursiveCall(...) \u003c 0``.\r\n\r\n1. ``Py_EnterRecursiveCall()`` [documentation](https://docs.python.org/3/c-api/exceptions.html#c.Py_EnterRecursiveCall) only guarantees that a **nonzero** value is returned in the event of an error.\r\n2. The actual implementation can't return a negative value:\r\n\r\nhttps://github.com/python/cpython/blob/76449350b3467b85bcb565f9e2bf945bd150a66e/Include/internal/pycore_ceval.h#L130-L138\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-101966\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/OTheDev","@type":"Person","name":"OTheDev"},"datePublished":"2023-02-16T22:55:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/101965/cpython/issues/101965"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c787aeb9-b55c-c34a-bf4c-e81049e16e21 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9282:2E599F:5F27A7:82044C:6969DC2C |
| html-safe-nonce | 9384b85edbc8bdf1ffcfc7a31bd693c49921959c8d819bf62b7925d6a1dbac1d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjgyOjJFNTk5Rjo1RjI3QTc6ODIwNDRDOjY5NjlEQzJDIiwidmlzaXRvcl9pZCI6IjU4NTc1NTU5ODU3OTczNDAyMDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 053cfd00ca3b17efa5e38943a0e73a1ba37d0c104c0bc03b2bc8e87bdfd11b0d |
| hovercard-subject-tag | issue:1588483694 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/101965/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8f128ad5f462f6c91fb58b37da05597c470a22b951abe50d62444756d3c13360/python/cpython/issues/101965 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8f128ad5f462f6c91fb58b37da05597c470a22b951abe50d62444756d3c13360/python/cpython/issues/101965 |
| og:image:alt | Using grep, I identified 3 instances in main where code checks if Py_EnterRecursiveCall(...) < 0 (which just returns _Py_EnterRecursiveCall(...)) or _Py_EnterRecursiveCall(...) < 0. Py_EnterRecursi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | OTheDev |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width