Why the cast to char*? bio->ptr is a void*.