Skip to content

Commit 8c92f89

Browse files
committed
Remove the last usage of MUST_INLINE
1 parent c86982a commit 8c92f89

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Bug fixes:
7171
* Fixed argument handling in `Kernel.printf`.
7272
* Fixed character length after conversion to binary from a non-US-ASCII String.
7373
* Fixed issue with installing latest bundler (#1880).
74+
* Fixed linking of always-inline C API functions with `-std=gnu90` (#1837, #1879).
7475

7576
Compatibility:
7677

lib/cext/include/truffleruby/truffleruby-pre.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ typedef VALUE ID;
4444
extern void* rb_tr_cext;
4545
#define RUBY_CEXT rb_tr_cext
4646

47-
#define MUST_INLINE __attribute__((always_inline)) inline
48-
4947
// Wrapping and unwrapping of values.
5048

5149
extern void* (*rb_tr_unwrap)(VALUE obj);

lib/cext/include/truffleruby/truffleruby.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ if (polyglot_as_boolean(polyglot_invoke(RUBY_CEXT, "warning?"))) { \
9090
} \
9191
} while (0);
9292

93-
MUST_INLINE int rb_tr_scan_args(int argc, VALUE *argv, const char *format, VALUE *v1, VALUE *v2, VALUE *v3, VALUE *v4, VALUE *v5, VALUE *v6, VALUE *v7, VALUE *v8, VALUE *v9, VALUE *v10);
94-
9593
#define rb_tr_scan_args_1(ARGC, ARGV, FORMAT, V1) rb_tr_scan_args(ARGC, ARGV, FORMAT, V1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
9694
#define rb_tr_scan_args_2(ARGC, ARGV, FORMAT, V1, V2) rb_tr_scan_args(ARGC, ARGV, FORMAT, V1, V2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
9795
#define rb_tr_scan_args_3(ARGC, ARGV, FORMAT, V1, V2, V3) rb_tr_scan_args(ARGC, ARGV, FORMAT, V1, V2, V3, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
@@ -164,7 +162,8 @@ VALUE rb_ivar_lookup(VALUE object, const char *name, VALUE default_value);
164162

165163
// Inline implementations
166164

167-
MUST_INLINE int rb_tr_scan_args(int argc, VALUE *argv, const char *format, VALUE *v1, VALUE *v2, VALUE *v3, VALUE *v4, VALUE *v5, VALUE *v6, VALUE *v7, VALUE *v8, VALUE *v9, VALUE *v10) {
165+
ALWAYS_INLINE(static int rb_tr_scan_args(int argc, VALUE *argv, const char *format, VALUE *v1, VALUE *v2, VALUE *v3, VALUE *v4, VALUE *v5, VALUE *v6, VALUE *v7, VALUE *v8, VALUE *v9, VALUE *v10));
166+
static inline int rb_tr_scan_args(int argc, VALUE *argv, const char *format, VALUE *v1, VALUE *v2, VALUE *v3, VALUE *v4, VALUE *v5, VALUE *v6, VALUE *v7, VALUE *v8, VALUE *v9, VALUE *v10) {
168167
// Parse the format string
169168

170169
// TODO CS 7-Feb-17 maybe we could inline cache this part?

0 commit comments

Comments
 (0)