ioinfo RRS feed

  • Question

  • Python (2.7.9) uses the following import to reach into the runtime (Modules\posixmodule.c)

    extern __declspec(dllimport) char * __pioinfo[];

    In VS2015, the internal ioinfo structure seems to have been removed. Granted the use there is a bit dicey. What I believe they are trying to do is to test for a valid IO handle without raising an exception. The python function is _PyVerify_fd().

    Given that this structure is no longer available, is there a better technique to validate an int file-descriptor without raising an exception? I suppose one could write this function with a try/except block; but I am not the original author and maybe they had a reason not to.

    If you need a little more information, I can easily cut/paste the original code from the python project.

    Tuesday, June 2, 2015 5:21 PM


All replies