diff options
author | midipix <writeonce@midipix.org> | 2015-05-26 22:54:36 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2015-09-26 10:17:06 -0400 |
commit | 239ee42e5853e09d8e5bb4b9c704f05ce9181c91 (patch) | |
tree | 87af9f3995fd04872d625baf24d7a845e2cc7caa /src/internal/pe_impl.c | |
parent | feffc7263bb2fd33ae467de2dd51f1ddbbb1b895 (diff) | |
download | pemagine-239ee42e5853e09d8e5bb4b9c704f05ce9181c91.tar.bz2 pemagine-239ee42e5853e09d8e5bb4b9c704f05ce9181c91.tar.xz |
internal string functions: change the return type from size_t to uint32_t.
Diffstat (limited to 'src/internal/pe_impl.c')
-rw-r--r-- | src/internal/pe_impl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/internal/pe_impl.c b/src/internal/pe_impl.c index 46069e8..2611f6b 100644 --- a/src/internal/pe_impl.c +++ b/src/internal/pe_impl.c @@ -8,7 +8,7 @@ #include <pemagine/pemagine.h> #include "pe_impl.h" -size_t pe_impl_strlen_ansi(const char * str) +uint32_t pe_impl_strlen_ansi(const char * str) { char * ch; char * upper_bound; @@ -19,13 +19,13 @@ size_t pe_impl_strlen_ansi(const char * str) for (ch = (char *)str; (ch < upper_bound) && (*ch); ch++); if (ch < upper_bound) - return (size_t)((intptr_t)ch - (intptr_t)str); + return (uint32_t)(ch - str); else return -1; } -size_t pe_impl_strlen_utf16(const wchar16_t * str) +uint32_t pe_impl_strlen_utf16(const wchar16_t * str) { wchar16_t * wch; wchar16_t * upper_bound; @@ -36,7 +36,7 @@ size_t pe_impl_strlen_utf16(const wchar16_t * str) for (wch = (wchar16_t *)str; (wch < upper_bound) && (*wch); wch++); if (wch < upper_bound) - return (size_t)((intptr_t)wch - (intptr_t)str); + return (uint32_t)(wch - str); else return -1; } |