| 28 | namespace internal { |
| 29 | |
| 30 | inline int StrCmp(SEXP x, SEXP y) { |
| 31 | if (x == NA_STRING) return (y == NA_STRING ? 0 : 1); |
| 32 | if (y == NA_STRING) return -1; |
| 33 | if (x == y) return 0; // same string in cache |
| 34 | return strcmp(char_nocheck(x), char_nocheck(y)); |
| 35 | } |
| 36 | |
| 37 | template <typename T> |
| 38 | struct NAComparator { |
no test coverage detected