From 7b212cadc88af135b34aad605f52e3d6059964c7 Mon Sep 17 00:00:00 2001 From: Stefan Sommerfeld Date: Sun, 7 Nov 2010 15:29:31 -0200 Subject: [PATCH] Fix for size_t in template. --- upnp/inc/TemplateInclude.h | 4 ++-- upnp/inc/TemplateSource.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/upnp/inc/TemplateInclude.h b/upnp/inc/TemplateInclude.h index 4e8c877..79ea834 100644 --- a/upnp/inc/TemplateInclude.h +++ b/upnp/inc/TemplateInclude.h @@ -95,10 +95,10 @@ /*! DOC_##CLASS##_##MEMBER */ \ EXPORT_SPEC const UpnpString *CLASS##_get_##MEMBER(const CLASS *p); \ EXPORT_SPEC int CLASS##_set_##MEMBER(CLASS *p, const UpnpString *s); \ - EXPORT_SPEC int CLASS##_get_##MEMBER##_Length(const CLASS *p); \ + EXPORT_SPEC size_t CLASS##_get_##MEMBER##_Length(const CLASS *p); \ EXPORT_SPEC const char *CLASS##_get_##MEMBER##_cstr(const CLASS *p); \ EXPORT_SPEC int CLASS##_strcpy_##MEMBER(CLASS *p, const char *s); \ - EXPORT_SPEC int CLASS##_strncpy_##MEMBER(CLASS *p, const char *s, int n); \ + EXPORT_SPEC int CLASS##_strncpy_##MEMBER(CLASS *p, const char *s, size_t n); \ EXPORT_SPEC void CLASS##_clear_##MEMBER(CLASS *p); \ diff --git a/upnp/inc/TemplateSource.h b/upnp/inc/TemplateSource.h index 1e09f09..ef4744d 100644 --- a/upnp/inc/TemplateSource.h +++ b/upnp/inc/TemplateSource.h @@ -151,7 +151,7 @@ int CLASS##_set_##MEMBER(CLASS *p, const UpnpString *s) \ return UpnpString_set_String(((struct S##CLASS *)p)->m_##MEMBER, q); \ } \ \ -int CLASS##_get_##MEMBER##_Length(const CLASS *p) \ +size_t CLASS##_get_##MEMBER##_Length(const CLASS *p) \ { \ return UpnpString_get_Length(CLASS##_get_##MEMBER(p)); \ } \ @@ -165,7 +165,7 @@ int CLASS##_strcpy_##MEMBER(CLASS *p, const char *s) \ return UpnpString_set_String(((struct S##CLASS *)p)->m_##MEMBER, s); \ } \ \ -int CLASS##_strncpy_##MEMBER(CLASS *p, const char *s, int n) \ +int CLASS##_strncpy_##MEMBER(CLASS *p, const char *s, size_t n) \ { \ return UpnpString_set_StringN(((struct S##CLASS *)p)->m_##MEMBER, s, n); \ } \