Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 660808
Collapse All | Expand All

(-)src/libs/xpcom18a4/python/src/ErrorUtils.cpp.ORIG (-4 / +4 lines)
Lines 55-61 Link Here
55
#endif
55
#endif
56
#include "nspr.h" // PR_fprintf
56
#include "nspr.h" // PR_fprintf
57
57
58
static char *PyTraceback_AsString(PyObject *exc_tb);
58
static const char *PyTraceback_AsString(PyObject *exc_tb);
59
59
60
// The internal helper that actually moves the
60
// The internal helper that actually moves the
61
// formatted string to the target!
61
// formatted string to the target!
Lines 358-364 Link Here
358
*/
358
*/
359
#define TRACEBACK_FETCH_ERROR(what) {errMsg = what; goto done;}
359
#define TRACEBACK_FETCH_ERROR(what) {errMsg = what; goto done;}
360
360
361
char *PyTraceback_AsString(PyObject *exc_tb)
361
const char *PyTraceback_AsString(PyObject *exc_tb)
362
{
362
{
363
	const char *errMsg = NULL; /* holds a local error message */
363
	const char *errMsg = NULL; /* holds a local error message */
364
	char *result = NULL; /* a valid, allocated result. */
364
	char *result = NULL; /* a valid, allocated result. */
Lines 438-446 Link Here
438
438
439
	{ // a temp scope so I can use temp locals.
439
	{ // a temp scope so I can use temp locals.
440
#if PY_MAJOR_VERSION <= 2
440
#if PY_MAJOR_VERSION <= 2
441
	char *tempResult = PyString_AsString(obResult);
441
	const char *tempResult = PyString_AsString(obResult);
442
#else
442
#else
443
	char *tempResult = PyUnicode_AsUTF8(obResult);
443
	const char *tempResult = PyUnicode_AsUTF8(obResult);
444
#endif
444
#endif
445
	result = (char *)PyMem_Malloc(strlen(tempResult)+1);
445
	result = (char *)PyMem_Malloc(strlen(tempResult)+1);
446
	if (result==NULL)
446
	if (result==NULL)

Return to bug 660808