Fix Strcmp - it didn't have consistent null pointer handling - revert to what it used to be - a lightweight wrapper around strcmp which means functions once again must not pass in null to it.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13943 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-12-02 13:36:13 +00:00
commit 89052f3b0a
8 changed files with 18 additions and 17 deletions

View file

@ -1153,11 +1153,7 @@ DOHString *DohNewStringf(const DOHString_or_char *fmt, ...) {
int DohStrcmp(const DOHString_or_char *s1, const DOHString_or_char *s2) {
const char *c1 = Char(s1);
const char *c2 = Char(s2);
if (c1 && c2) {
return strcmp(c1, c2);
} else {
return c1 < c2;
}
return strcmp(c1, c2);
}
int DohStrncmp(const DOHString_or_char *s1, const DOHString_or_char *s2, int n) {