diff options
author | Jeremy Allison <jra@samba.org> | 2000-01-26 00:12:35 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-01-26 00:12:35 +0000 |
commit | d867b86721e988dee56d5e9382b32c870ccb2790 (patch) | |
tree | a19b4985a60d194abe083f9b0a6260c0c090b232 /source3/lib/util_unistr.c | |
parent | b5e7e4277d87c9eaa663f92c081a869b34170380 (diff) | |
download | samba-d867b86721e988dee56d5e9382b32c870ccb2790.tar.gz samba-d867b86721e988dee56d5e9382b32c870ccb2790.tar.bz2 samba-d867b86721e988dee56d5e9382b32c870ccb2790.zip |
Second set of inline optimisation fixes from Ying Chen <ying@almaden.ibm.com>.
Stop makeing function calls for every use of skip_multibyte_char. This function
is called several *million* times during a NetBench run :-).
Jeremy.
(This used to be commit e5a3deba46ea2d4cb49a6c4b73edd766fe8b5a5c)
Diffstat (limited to 'source3/lib/util_unistr.c')
-rw-r--r-- | source3/lib/util_unistr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c index 5e7076d5df..a512f68acc 100644 --- a/source3/lib/util_unistr.c +++ b/source3/lib/util_unistr.c @@ -54,7 +54,7 @@ int dos_PutUniCode(char *dst,const char *src, ssize_t len) { int ret = 0; while (*src && (len > 2)) { - size_t skip = skip_multibyte_char(*src); + size_t skip = get_character_len(*src); smb_ucs2_t val = (*src & 0xff); /* @@ -272,7 +272,7 @@ size_t dos_struni2(char *dst, const char *src, size_t max_len) if (src != NULL) { for (; *src && len < max_len-2; len++, dst +=2) { - size_t skip = skip_multibyte_char(*src); + size_t skip = get_character_len(*src); smb_ucs2_t val = (*src & 0xff); /* @@ -615,7 +615,7 @@ smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, dst_len /= sizeof(smb_ucs2_t); /* Convert to smb_ucs2_t units. */ for(i = 0; (i < (dst_len - 1)) && src[i];) { - size_t skip = skip_multibyte_char(*src); + size_t skip = get_character_len(*src); smb_ucs2_t val = (*src & 0xff); /* |