Modify int to int32_t and add some const restriction.