VirtualBox

Changeset 59802 in vbox for trunk


Ignore:
Timestamp:
Feb 24, 2016 3:33:14 PM (9 years ago)
Author:
vboxsync
Message:

python/client/init.py: combine int and long conversions for python 3, alias 'long' to 'int' for python 3 just in case it's needed for parsing the _XPCOMBase.long method.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/python/client/__init__.py

    r59798 r59802  
    4646    IID_nsISupportsWeakReference, IID_nsIWeakReference, \
    4747    XPTI_GetInterfaceInfoManager, GetComponentManager, XPTC_InvokeByIndex
     48
     49# Python 3 hacks:
     50import sys
     51if sys.version_info[0] >= 3:
     52    long = int      # pylint: disable=W0622,C0103
    4853
    4954# Attribute names we may be __getattr__'d for, but know we don't want to delegate
     
    223228
    224229    def __int__(self):
     230        if sys.version_info[0] >= 3:
     231            return self._do_conversion(_int_interfaces + _long_interfaces, int)
    225232        return self._do_conversion(_int_interfaces, int)
    226233
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