From d867b86721e988dee56d5e9382b32c870ccb2790 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 26 Jan 2000 00:12:35 +0000 Subject: Second set of inline optimisation fixes from Ying Chen . 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) --- source3/include/proto.h | 1 - source3/include/smb.h | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index aa6e4104c1..03fc5b1353 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -119,7 +119,6 @@ int get_interfaces(struct iface_struct *ifaces, int max_interfaces); /*The following definitions come from lib/kanji.c */ void interpret_coding_system(char *str); -BOOL is_multibyte_codepage(void); void initialize_multibyte_vectors( int client_codepage); /*The following definitions come from lib/md4.c */ diff --git a/source3/include/smb.h b/source3/include/smb.h index 58c43e76c7..6f0e16e869 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1699,6 +1699,11 @@ enum ssl_version_enum {SMB_SSL_V2,SMB_SSL_V3,SMB_SSL_V23,SMB_SSL_TLS1}; #define DEFAULT_CLIENT_CODE_PAGE MSDOS_LATIN_1_CODEPAGE #endif /* KANJI */ +/* Global val set if multibyte codepage. */ +extern int global_is_multibyte_codepage; + +#define get_character_len(x) (global_is_multibyte_codepage ? skip_multibyte_char((x)) : 0) + /* * Size of buffer to use when moving files across filesystems. */ -- cgit