VirtualBox

Changeset 90632 in vbox for trunk/src/libs


Ignore:
Timestamp:
Aug 11, 2021 4:26:36 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
146244
Message:

xpcom/python: Use PyObject_Init instead of _Py_NewReferences for all versions. bugref:10079

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

Legend:

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

    r90631 r90632  
    266266        ob_type = GetTypeObject();
    267267#endif
    268         PyObject_Init(this, ob_type); /* VBox: Needed for 3.9 and up (also works on Python 2.7), includes _Py_NewReferences. @bugref{10079} */
     268#if 1 /* VBox: Must use for 3.9+, includes _Py_NewReferences. Works for all older versions too. @bugref{10079} */
     269        PyObject_Init(this, ob_type);
     270#else
     271        _Py_NewReference(this);
     272#endif
    269273
    270274        m_iid = riid;
  • trunk/src/libs/xpcom18a4/python/src/PyISupports.cpp

    r90631 r90632  
    146146        PR_AtomicIncrement(&cInterfaces);
    147147        PyXPCOM_DLLAddRef();
    148         PyObject_Init(this, ob_type); /* VBox: Needed for 3.9 and up (also works on Python 2.7), includes _Py_NewReferences. @bugref{10079} */
     148#if 1 /* VBox: Must use for 3.9+, includes _Py_NewReferences. Works for all older versions too. @bugref{10079} */
     149        PyObject_Init(this, ob_type);
     150#else
     151        _Py_NewReference(this);
     152#endif
    149153
    150154#ifdef VBOX_DEBUG_LIFETIMES
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