pb: add void * for flush ctx to mapping functions