liblinear uses int for quantities, cast to size_t where necessary.