Use unsigned type for APIs with opt flag mask