VirtualBox

Changeset 101939 in vbox


Ignore:
Timestamp:
Nov 7, 2023 12:28:57 PM (15 months ago)
Author:
vboxsync
Message:

libs/xpcom/python: Don't call PyEval_InitThreads() on python >= 3.9.0 as it got deprecated there and is done implicitely since pythpn 3.7 anyway, fixes compiler warning, bugref:10545

Location:
trunk/src/libs/xpcom18a4/python/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/python/src/dllmain.cpp

    r101846 r101939  
    213213                        }
    214214
     215                        /* Done automatically since python 3.7 and deprecated since python 3.9. */
     216#if PY_VERSION_HEX < 0x03090000
    215217                        // Must force Python to start using thread locks, as
    216218                        // we are free-threaded (maybe, I think, sometimes :-)
    217219                        PyEval_InitThreads();
     220#endif
    218221#ifndef PYXPCOM_USE_PYGILSTATE
    219222                        // Release Python lock, as first thing we do is re-get it.
  • trunk/src/libs/xpcom18a4/python/src/module/_xpcom.cpp

    r101919 r101939  
    775775#endif
    776776
     777        /* Done automatically since python 3.7 and deprecated since python 3.9. */
     778#if PY_VERSION_HEX < 0x03090000
    777779        // Must force Python to start using thread locks
    778780        PyEval_InitThreads();
     781#endif
    779782
    780783        // Create the module and add the functions
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette