NUMPY_API */
| 580 | /*NUMPY_API |
| 581 | */ |
| 582 | NPY_NO_EXPORT int |
| 583 | PyArray_CompareString(const char *s1, const char *s2, size_t len) |
| 584 | { |
| 585 | const unsigned char *c1 = (unsigned char *)s1; |
| 586 | const unsigned char *c2 = (unsigned char *)s2; |
| 587 | size_t i; |
| 588 | |
| 589 | for(i = 0; i < len; ++i) { |
| 590 | if (c1[i] != c2[i]) { |
| 591 | return (c1[i] > c2[i]) ? 1 : -1; |
| 592 | } |
| 593 | } |
| 594 | return 0; |
| 595 | } |
| 596 | |
| 597 | |
| 598 | /* Call this from contexts where an array might be written to, but we have no |
nothing calls this directly
no outgoing calls
no test coverage detected