Changeset 59801 in vbox
- Timestamp:
- Feb 24, 2016 3:31:48 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/python/server/policy.py
r59798 r59801 44 44 import logging 45 45 import sys 46 47 # Python 3 hacks: 48 if sys.version_info[0] >= 3: 49 long = int # pylint: disable=W0622,C0103 46 50 47 51 … … 333 337 return self._doHandleException(name, exc_info) 334 338 335 _supports_primitives_data_ = [ 336 ("nsISupportsCString", "__str__", str), 337 ("nsISupportsString", "__unicode__", str), 338 ("nsISupportsPRUint64", "__long__", int), 339 ("nsISupportsPRInt64", "__long__", int), 340 ("nsISupportsPRUint32", "__int__", int), 341 ("nsISupportsPRInt32", "__int__", int), 342 ("nsISupportsPRUint16", "__int__", int), 343 ("nsISupportsPRInt16", "__int__", int), 344 ("nsISupportsPRUint8", "__int__", int), 345 ("nsISupportsPRBool", "__nonzero__", operator.truth), 346 ("nsISupportsDouble", "__float__", float), 347 ("nsISupportsFloat", "__float__", float), 348 ] 339 if sys.version_info[0] <= 2: 340 _supports_primitives_data_ = [ 341 ("nsISupportsCString", "__str__", str), 342 ("nsISupportsString", "__unicode__", unicode), 343 ("nsISupportsPRUint64", "__long__", long), 344 ("nsISupportsPRInt64", "__long__", long), 345 ("nsISupportsPRUint32", "__int__", int), 346 ("nsISupportsPRInt32", "__int__", int), 347 ("nsISupportsPRUint16", "__int__", int), 348 ("nsISupportsPRInt16", "__int__", int), 349 ("nsISupportsPRUint8", "__int__", int), 350 ("nsISupportsPRBool", "__nonzero__", operator.truth), 351 ("nsISupportsDouble", "__float__", float), 352 ("nsISupportsFloat", "__float__", float), 353 ] 354 else: 355 _supports_primitives_data_ = [ 356 ("nsISupportsCString", "__str__", str), 357 ("nsISupportsString", "__unicode__", str), 358 ("nsISupportsPRUint64", "__long__", int), 359 ("nsISupportsPRInt64", "__long__", int), 360 ("nsISupportsPRUint32", "__int__", int), 361 ("nsISupportsPRInt32", "__int__", int), 362 ("nsISupportsPRUint16", "__int__", int), 363 ("nsISupportsPRInt16", "__int__", int), 364 ("nsISupportsPRUint8", "__int__", int), 365 ("nsISupportsPRBool", "__nonzero__", operator.truth), 366 ("nsISupportsDouble", "__float__", float), 367 ("nsISupportsFloat", "__float__", float), 368 ] 349 369 350 370 # Support for the nsISupports primitives:
Note:
See TracChangeset
for help on using the changeset viewer.