Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ブール値とオプションの Unicode 文字列 (ブール値が True の場合にのみ設定する必要があります) を解析しようとしています。
PyObject *pBool, *pStr;
PyArg_ParseTuple(args, "O!|u", &PyBool_Type, pBool, pStr);
そのように関数を呼び出すと: func(True, u'str'); func(False);
func(True, u'str');
func(False);
コードがクラッシュします。
私は何を間違っていますか?