fix seg fault with feature:callback
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8178 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
71894cf4b0
commit
716317c25d
3 changed files with 15 additions and 4 deletions
|
|
@ -1134,7 +1134,13 @@ DohNewStringf(const DOH *fmt, ...)
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
int DohStrcmp(const DOHString_or_char *s1, const DOHString_or_char *s2) {
|
||||
return strcmp(Char(s1),Char(s2));
|
||||
const char *c1 = Char(s1);
|
||||
const char *c2 = Char(s2);
|
||||
if (c1 && c2) {
|
||||
return strcmp(c1, c2);
|
||||
} else {
|
||||
return c1 < c2;
|
||||
}
|
||||
}
|
||||
|
||||
int DohStrncmp(const DOHString_or_char *s1, const DOHString_or_char *s2, int n) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue