If the function is intended to be inlined, why we need prototype for it.
The INLINE function should have immediate implementation, and not prototype.
I will use the following macro to handle this.

#if defined(__GNUC__) /* && __GNUC__ > nnn */
# define INLINE __inline__
#elif defined(_MSC_VER) /* && _MSC_VER > nnn */
# define INLINE __inline
#else
# define INLINE static
#endif

INLINE int
rx_is_newline(struct Parrot_Interp *, INTVAL ch) {
        return (ch >= 0x0A && ch <= 0x0D)
                || (ch == 0x85)
                || ((ch | 1) == 0x2029);
}

If the function can not be inlined, we can use inline version to call
the offline one. The only problem here is we will see a lot of warnings
regarding unused static function.

Hong

Reply via email to