Skip to content

Commit 791dc83

Browse files
authored
remove configure test for inline keyword (python#1231)
We require C99, so a configure test for this standard feature is not needed.
1 parent f60c9e5 commit 791dc83

File tree

5 files changed

+2
-74
lines changed

5 files changed

+2
-74
lines changed

Include/pyport.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,9 @@ typedef int Py_ssize_clean_t;
173173
/* fastest possible local call under MSVC */
174174
#define Py_LOCAL(type) static type __fastcall
175175
#define Py_LOCAL_INLINE(type) static __inline type __fastcall
176-
#elif defined(USE_INLINE)
177-
#define Py_LOCAL(type) static type
178-
#define Py_LOCAL_INLINE(type) static inline type
179176
#else
180177
#define Py_LOCAL(type) static type
181-
#define Py_LOCAL_INLINE(type) static type
178+
#define Py_LOCAL_INLINE(type) static inline type
182179
#endif
183180

184181
/* Py_MEMCPY is kept for backwards compatibility,

Modules/_sre.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,8 @@ static const char copyright[] =
6666
#pragma warning(disable: 4710) /* who cares if functions are not inlined ;-) */
6767
/* fastest possible local call under MSVC */
6868
#define LOCAL(type) static __inline type __fastcall
69-
#elif defined(USE_INLINE)
70-
#define LOCAL(type) static inline type
7169
#else
72-
#define LOCAL(type) static type
70+
#define LOCAL(type) static inline type
7371
#endif
7472

7573
/* error codes */

configure

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,6 @@ ARFLAGS
695695
ac_ct_AR
696696
AR
697697
RANLIB
698-
USE_INLINE
699698
GNULD
700699
LINKCC
701700
LDVERSION
@@ -5839,56 +5838,6 @@ esac
58395838
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
58405839
$as_echo "$GNULD" >&6; }
58415840

5842-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5843-
$as_echo_n "checking for inline... " >&6; }
5844-
if ${ac_cv_c_inline+:} false; then :
5845-
$as_echo_n "(cached) " >&6
5846-
else
5847-
ac_cv_c_inline=no
5848-
for ac_kw in inline __inline__ __inline; do
5849-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5850-
/* end confdefs.h. */
5851-
#ifndef __cplusplus
5852-
typedef int foo_t;
5853-
static $ac_kw foo_t static_foo () {return 0; }
5854-
$ac_kw foo_t foo () {return 0; }
5855-
#endif
5856-
5857-
_ACEOF
5858-
if ac_fn_c_try_compile "$LINENO"; then :
5859-
ac_cv_c_inline=$ac_kw
5860-
fi
5861-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5862-
test "$ac_cv_c_inline" != no && break
5863-
done
5864-
5865-
fi
5866-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5867-
$as_echo "$ac_cv_c_inline" >&6; }
5868-
5869-
case $ac_cv_c_inline in
5870-
inline | yes) ;;
5871-
*)
5872-
case $ac_cv_c_inline in
5873-
no) ac_val=;;
5874-
*) ac_val=$ac_cv_c_inline;;
5875-
esac
5876-
cat >>confdefs.h <<_ACEOF
5877-
#ifndef __cplusplus
5878-
#define inline $ac_val
5879-
#endif
5880-
_ACEOF
5881-
;;
5882-
esac
5883-
5884-
if test "$ac_cv_c_inline" != no ; then
5885-
5886-
$as_echo "#define USE_INLINE 1" >>confdefs.h
5887-
5888-
5889-
fi
5890-
5891-
58925841
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
58935842
$as_echo_n "checking for --enable-shared... " >&6; }
58945843
# Check whether --enable-shared was given.

configure.ac

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,13 +1078,6 @@ case `"$ac_prog" -V 2>&1 < /dev/null` in
10781078
esac
10791079
AC_MSG_RESULT($GNULD)
10801080

1081-
AC_C_INLINE
1082-
if test "$ac_cv_c_inline" != no ; then
1083-
AC_DEFINE(USE_INLINE, 1, [Define to use the C99 inline keyword.])
1084-
AC_SUBST(USE_INLINE)
1085-
fi
1086-
1087-
10881081
AC_MSG_CHECKING(for --enable-shared)
10891082
AC_ARG_ENABLE(shared,
10901083
AS_HELP_STRING([--enable-shared], [disable/enable building shared python library]))

pyconfig.h.in

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,9 +1342,6 @@
13421342
/* Define if you want to use computed gotos in ceval.c. */
13431343
#undef USE_COMPUTED_GOTOS
13441344

1345-
/* Define to use the C99 inline keyword. */
1346-
#undef USE_INLINE
1347-
13481345
/* Enable extensions on AIX 3, Interix. */
13491346
#ifndef _ALL_SOURCE
13501347
# undef _ALL_SOURCE
@@ -1484,12 +1481,6 @@
14841481
/* Define to `int' if <sys/types.h> doesn't define. */
14851482
#undef gid_t
14861483

1487-
/* Define to `__inline__' or `__inline' if that's what the C compiler
1488-
calls it, or to nothing if 'inline' is not supported under any name. */
1489-
#ifndef __cplusplus
1490-
#undef inline
1491-
#endif
1492-
14931484
/* Define to `int' if <sys/types.h> does not define. */
14941485
#undef mode_t
14951486

0 commit comments

Comments
 (0)