| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| return -1; | ||
| goto err; | ||
| } | ||
| err: |
There was a problem hiding this comment.
To have a more regular try: ... finally: _PyEval_StartTheWorld() pattern, you can add an int res = -1; variable, replace goto err with goto done, and set res to 0 on success (3 lines above).
Sorry, something went wrong.
There was a problem hiding this comment.
I think @vstinner's suggestion is fine. Or you can refactor the parts that should be in a stop-the-world call into it's own function, like we often do for locks.
Another advantage of moving the body to a separate function is that it makes it more clear what data crosses the stop-the-world boundary -- some data loaded before the stop-the-world call may not be valid after it.
Sorry, something went wrong.
| int | ||
| _PyDict_DetachFromObject(PyDictObject *dict, PyObject *obj); | ||
|
|
||
| PyDictObject *_PyObject_materialize_managed_dict_lock_held(PyObject *); |
There was a problem hiding this comment.
Let's name this like the other functions: _PyObject_MaterializeManagedDict_LockHeld and move the definition up next to _PyObject_MaterializeManagedDict.
Sorry, something went wrong.
| return -1; | ||
| goto err; | ||
| } | ||
| err: |
There was a problem hiding this comment.
I think @vstinner's suggestion is fine. Or you can refactor the parts that should be in a stop-the-world call into it's own function, like we often do for locks.
Another advantage of moving the body to a separate function is that it makes it more clear what data crosses the stop-the-world boundary -- some data loaded before the stop-the-world call may not be valid after it.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM with a few comments about comments.
I think this should be backported to 3.13
Sorry, something went wrong.
|
Thanks @Fidget-Spinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
|
Sorry, @Fidget-Spinner, I could not cleanly backport this to 3.13 due to a conflict. cherry_picker 3bfc9c831ad9a3dcf4457e842f1e612e93014a17 3.13 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.