Skip to content
Snippets Groups Projects
  • Willian Padovani Germano's avatar
    c31de002
    Script menus: · c31de002
    Willian Padovani Germano authored
    -- trying a different approach to see if the crash on Windows goes away.
    
    Running a script with PyRun_File -- a Python/C API function -- was probably
    the cause for crashes on Windows, because it uses a pointer to a FILE
    struct and on windows this struct can be "different and incompatible"
    depending on which libc was used to build the program.  This is mentioned in
    the Python/C API Ref Manual, chapter 2.
    
    Now we're loading the file contents to a string buffer and using PyRun_String.
    c31de002
    History
    Script menus:
    Willian Padovani Germano authored
    -- trying a different approach to see if the crash on Windows goes away.
    
    Running a script with PyRun_File -- a Python/C API function -- was probably
    the cause for crashes on Windows, because it uses a pointer to a FILE
    struct and on windows this struct can be "different and incompatible"
    depending on which libc was used to build the program.  This is mentioned in
    the Python/C API Ref Manual, chapter 2.
    
    Now we're loading the file contents to a string buffer and using PyRun_String.