This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.14-356-g396a21b


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  396a21b1d016c52e011f8921e0728aa62a1e9df0 (commit)
      from  349290c00a26567051ef953efcb874d7ee7def1e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=396a21b1d016c52e011f8921e0728aa62a1e9df0

commit 396a21b1d016c52e011f8921e0728aa62a1e9df0
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Fri Oct 14 18:46:12 2011 -0400

    Support optimized isXXX functions in C++ code

diff --git a/ChangeLog b/ChangeLog
index 2faba53..499050b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-14  Ulrich Drepper  <drepper@gmail.com>
+
+	* ctype/ctype.h: Add support for inlined isXXX functions when
+	compiling C++ code.
+
 2011-10-14  Andreas Schwab  <schwab@redhat.com>
 
 	* sysdeps/s390/fpu/libm-test-ulps: Adjust ULPs for jn tests.
diff --git a/ctype/ctype.h b/ctype/ctype.h
index e859c4a..111e3a9 100644
--- a/ctype/ctype.h
+++ b/ctype/ctype.h
@@ -1,5 +1,5 @@
-/* Copyright (C) 1991,92,93,95,96,97,98,99,2001,2002,2004,2007,2008,2009
-   	Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,95,96,97,98,99,2001,2002,2004,2007,2008,2009,2011
+	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -85,8 +85,18 @@ extern __const __int32_t **__ctype_tolower_loc (void)
 extern __const __int32_t **__ctype_toupper_loc (void)
      __THROW __attribute__ ((__const));
 
-#define __isctype(c, type) \
+
+#ifndef __cplusplus
+# define __isctype(c, type) \
   ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
+#elif defined __USE_EXTERN_INLINES
+# define __isctype_f(type) \
+  __extern_inline int							      \
+  is##type (int __c)							      \
+  {									      \
+    return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _IS##type; \
+  }
+#endif
 
 #define	__isascii(c)	(((c) & ~0x7f) == 0)	/* If C is a 7 bit value.  */
 #define	__toascii(c)	((c) & 0x7f)		/* Mask off high bits.  */
@@ -169,7 +179,23 @@ __exctype (_tolower);
 	__res = (a)[(int) (c)];						      \
       __res; }))
 
-#if !defined __NO_CTYPE && !defined __cplusplus
+#if !defined __NO_CTYPE
+# ifdef __isctype_f
+__isctype_f (alnum)
+__isctype_f (alpha)
+__isctype_f (cntrl)
+__isctype_f (digit)
+__isctype_f (lower)
+__isctype_f (graph)
+__isctype_f (print)
+__isctype_f (punct)
+__isctype_f (space)
+__isctype_f (upper)
+__isctype_f (xdigit)
+#  ifdef __USE_ISOC99
+__isctype_f (blank)
+#  endif
+# elif defined __isctype
 # define isalnum(c)	__isctype((c), _ISalnum)
 # define isalpha(c)	__isctype((c), _ISalpha)
 # define iscntrl(c)	__isctype((c), _IScntrl)
@@ -181,9 +207,9 @@ __exctype (_tolower);
 # define isspace(c)	__isctype((c), _ISspace)
 # define isupper(c)	__isctype((c), _ISupper)
 # define isxdigit(c)	__isctype((c), _ISxdigit)
-
-# ifdef __USE_ISOC99
-#  define isblank(c)	__isctype((c), _ISblank)
+#  ifdef __USE_ISOC99
+#   define isblank(c)	__isctype((c), _ISblank)
+#  endif
 # endif
 
 # ifdef __USE_EXTERN_INLINES

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog     |    5 +++++
 ctype/ctype.h |   40 +++++++++++++++++++++++++++++++++-------
 2 files changed, 38 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]