• ruby internal technology question

    From aotto1968@21:1/5 to All on Fri Sep 27 09:52:47 2024
    Hi, the following code from "symbol.h"

    #if defined(HAVE_STMT_AND_DECL_IN_EXPR)
    /* __builtin_constant_p and statement expression is available
    * since gcc-2.7.2.3 at least. */
    #define rb_intern(str) \
    (RBIMPL_CONSTANT_P(str) ? \
    __extension__ ({ \
    static ID rbimpl_id; \
    rbimpl_intern_const(&rbimpl_id, (str)); \
    }) : \
    (rb_intern)(str))
    #endif

    #endif /* RBIMPL_SYMBOL_H */

    uses

    static ID rbimpl_id;

    just to provide storage for the ID, why?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)