Gcc complains as follows: Objects/frameobject.c:140: warning: passing arg 2 of `PyString_AsStringAndSize' from incompatible pointer type because code is declared as unsigned char* and PyString_AsStringAndSize expects an address of a plain char*. Attached patch adds an explicit cast to silence the warning.