[2/10] wsdapi: Add helper functions for populating XML strings.
Huw Davies
huw at codeweavers.com
Fri Sep 15 03:01:22 CDT 2017
On Thu, Sep 14, 2017 at 10:54:17PM +0100, Owen Rudge wrote:
> Signed-off-by: Owen Rudge <orudge at codeweavers.com>
> ---
> dlls/wsdapi/Makefile.in | 3 +-
> dlls/wsdapi/soap.c | 86
> +++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 88 insertions(+), 1 deletion(-)
> create mode 100644 dlls/wsdapi/soap.c
>
>
Unfortunately adding unused helper functions isn't the right way to
split up the patches. You'll need to find a way to break up the
functionality while incrementally adding these things.
> diff --git a/dlls/wsdapi/soap.c b/dlls/wsdapi/soap.c
> new file mode 100644
> index 0000000..9662203
> --- /dev/null
> +++ b/dlls/wsdapi/soap.c
> +static inline void free_xml_string(WS_XML_STRING *value)
> +{
> + HANDLE heap;
> +
> + if (value == NULL)
> + return;
> +
> + heap = GetProcessHeap();
> +
> + if (value->bytes != NULL)
> + HeapFree(heap, 0, value->bytes);
> +
> + HeapFree(heap, 0, value);
> +}
>
GetProcessHeap() is cheap, you don't need to bother caching it. You
may want to consider using the standardized heap_alloc() / heap_free()
helpers.
Huw.
More information about the wine-devel
mailing list