Re: [xml] Linking against the Libxml2 using a non standard XML(Patch)



Johnson, Cameron wrote:
Due to factors beyond my control I must compile our application with
_stdcall.  Although a lot of work has been done so that the functions
can be used with any calling convention, I had to make the following
changes to get the application to link and run.

File: xmlmemory.h
Line 57
        From:
        typedef void (*xmlFreeFunc)(void *mem);
        To:
        typedef void (XMLCALL *xmlFreeFunc)(void *mem);
Line 66
        From:
        typedef void *(*xmlMallocFunc)(size_t size);
        To:
        typedef void *(XMLCALL *xmlMallocFunc)(size_t size);
Line 77
        From:
        typedef void *(*xmlReallocFunc)(void *mem, size_t size);
        To:
        typedef void *(XMLCALL *xmlReallocFunc)(void *mem, size_t size);


This allows us to link correctly without warning and allows the
application to run correctly.  Without this change I will get Stack
corruption errors upon calling xmlFree().

Thanks, that is okay. The calling convention belongs in every pointer to a function, not just in those three. If there are no objections, I'll commit this.

Ciao,
Igor



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]