Skip to content

Commit e9c28ff

Browse files
committed
drop static_inline macro
1 parent e934fa2 commit e9c28ff

5 files changed

Lines changed: 16 additions & 22 deletions

File tree

include/express/basic.h

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@
8585
# include <sc_stdbool.h>
8686
#endif
8787

88+
#if defined(_MSC_VER) && (_MSC_VER < 1900) && !defined(__cplusplus)
89+
#define inline __inline
90+
#endif
8891

8992
/**************************/
9093
/* function pointer types */
@@ -93,20 +96,6 @@
9396
typedef void ( *voidFuncptr )();
9497
typedef int ( *intFuncptr )();
9598

96-
/******************************/
97-
/* deal with inline functions */
98-
/******************************/
99-
100-
#if !defined(static_inline)
101-
#if (!defined(__GNUC__) && !defined(__MSVC__)) || defined(__STRICT_ANSI)
102-
#define static_inline
103-
#undef supports_inline_functions
104-
#else
105-
#define static_inline static __inline
106-
#define supports_inline_functions 1L
107-
#endif /* */
108-
#endif /* !defined(static_inline) */
109-
11099
/* allow same declarations to suffice for both Standard and Classic C */
111100
/* ... at least in header files ... */
112101

include/express/error.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,23 +126,23 @@ extern SC_EXPRESS_EXPORT void ERROR_flush_message_buffer( void );
126126
/* Inline functions */
127127
/********************/
128128

129-
static_inline void ERRORdisable( Error error ) {
129+
static inline void ERRORdisable( Error error ) {
130130
if( error != ERROR_none ) {
131131
error->enabled = false;
132132
}
133133
}
134134

135-
static_inline void ERRORenable( Error error ) {
135+
static inline void ERRORenable( Error error ) {
136136
if( error != ERROR_none ) {
137137
error->enabled = true;
138138
}
139139
}
140140

141-
static_inline bool ERRORis_enabled( Error error ) {
141+
static inline bool ERRORis_enabled( Error error ) {
142142
return error->enabled;
143143
}
144144

145-
static_inline void ERRORbuffer_messages( bool flag ) {
145+
static inline void ERRORbuffer_messages( bool flag ) {
146146
#if !defined(__MSVC__) && !defined(__BORLAND__)
147147
extern void ERROR_start_message_buffer( void ),
148148
ERROR_flush_message_buffer( void );
@@ -155,7 +155,7 @@ static_inline void ERRORbuffer_messages( bool flag ) {
155155
}
156156
}
157157

158-
static_inline void ERRORflush_messages( void ) {
158+
static inline void ERRORflush_messages( void ) {
159159
#if !defined(__MSVC__) && !defined(__BORLAND__)
160160
extern void ERROR_start_message_buffer( void ),
161161
ERROR_flush_message_buffer( void );
@@ -167,6 +167,7 @@ static_inline void ERRORflush_messages( void ) {
167167
}
168168
}
169169

170+
170171
/***********************/
171172
/* function prototypes */
172173
/***********************/

include/express/lexact.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ extern SC_EXPRESS_EXPORT Error ERROR_nonascii_char;
9595
# define SCANtext_ready (*SCANcurrent != '\0')
9696
#endif
9797

98+
#ifndef static_inline
99+
# define static_inline static inline
100+
#endif
101+
98102
/***********************/
99103
/* function prototypes */
100104
/***********************/

src/express/expr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static Error ERROR_enum_no_such_item;
106106
static Error ERROR_group_ref_no_such_entity;
107107
static Error ERROR_group_ref_unexpected_type;
108108

109-
static_inline int OPget_number_of_operands( Op_Code op ) {
109+
static inline int OPget_number_of_operands( Op_Code op ) {
110110
if( ( op == OP_NEGATE ) || ( op == OP_NOT ) ) {
111111
return 1;
112112
} else if( op == OP_SUBCOMPONENT ) {

src/express/hash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ struct freelist_head HASH_Element_fl;
118118
** Internal routines
119119
*/
120120

121-
static_inline Address HASHhash( char *, Hash_Table );
121+
static inline Address HASHhash( char *, Hash_Table );
122122
static void HASHexpand_table( Hash_Table );
123123

124124
/*
@@ -409,7 +409,7 @@ HASHsearch( Hash_Table table, Element item, Action action ) {
409409
** Internal routines
410410
*/
411411

412-
static_inline Address HASHhash( char * Key, Hash_Table table ) {
412+
static inline Address HASHhash( char * Key, Hash_Table table ) {
413413
Address h, address;
414414
register unsigned char * k = ( unsigned char * )Key;
415415

0 commit comments

Comments
 (0)