axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Yves Baudy <jy.ba...@free.fr>
Subject [Help] strdup function and Visual C++ 6
Date Mon, 29 Mar 2004 16:21:18 GMT
Hi all,

We are having a problem with strdup (only used in SoapDeSerializer.cpp) 
with Visual C++ 6.

When generating a C client with a complexType that define xsd:string 
elements if call Axis_Delete_MyCplxType(myCplxObj,0,0) we have strange 
message from Visual C++ 6 (heap violation).

To success we have replaced strdup whith axis_strdup

char *axis_strdup(const char *s) {
    register char *p = (char *)malloc(strlen(s)+1);
     if (p != NULL)
       strcpy(p, s);
        return p;
}

We are not very familiar with C. Have you got an idea of why strdup fail 
with  Visual C++ 6 ?

Regards,

Jean-Yves

Mime
View raw message