| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| @@ -1855,6 +1855,8 @@ internal static bool PyIter_Check(IntPtr pointer) | |||
|
|
|||
| [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] | |||
| internal static extern IntPtr PyIter_Next(IntPtr pointer); | |||
There was a problem hiding this comment.
Do we still need this?
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, there are still a few uses.
Sorry, something went wrong.
also added exception handling for PyIter_Next PyObject now implements `IEnumerable<PyObject>`
| Back | FazBrowse Home | New Git URL |
What does this implement/fix? Explain your changes.
Prior to this change trying to use object returned by iterating over PyObject would fail after iterator is closed, because iterator would dispose previously returned objects on close/moving to the next one.
This also adds error handling for PyIter_Next calls, which can have other reasons to fail beyond reaching the end of collection.
Checklist
Check all those that are applicable and complete.