VirtualBox

Changeset 73153 in vbox for trunk/src/libs/xpcom18a4/python


Ignore:
Timestamp:
Jul 16, 2018 10:37:06 AM (7 years ago)
Author:
vboxsync
Message:

xpcom18a4: fix ErrorUtils.cpp for Python 3.7, where PyUnicode_AsUTF8() returns const char *. Thank you Gianfranco Costamagna.

File:
1 edited

Legend:

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

    r59809 r73153  
    441441        char *tempResult = PyString_AsString(obResult);
    442442#else
    443         char *tempResult = PyUnicode_AsUTF8(obResult);
     443    /* PyUnicode_AsUTF8() is const char * as of Python 3.7, char * earlier. */
     444        const char *tempResult = (const char *)PyUnicode_AsUTF8(obResult);
    444445#endif
    445446        result = (char *)PyMem_Malloc(strlen(tempResult)+1);
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