1

I'm trying to parse a boolean and an optional unicode string (which should be set only if the boolean is True).

PyObject *pBool, *pStr;

PyArg_ParseTuple(args, "O!|u", &PyBool_Type, pBool, pStr);

When I call my function like that: func(True, u'str'); func(False);

My code crashes.

What am I doing wrong?

John Doe
  • 169
  • 1
  • 8

0 Answers0