🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.ruby
Article #1

ruby internal technology question

#1
From: aotto1968
Date: Fri, 27 Sep 2024 07:52
22 lines
1684 bytes
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?
Technical Details
Message-ID: <vd5o8f$lcmi$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf8.newsdeef.eu!nnrp.usenet.blueworldhosting.com!!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <vd5o8f$lcmi$1@dont-email.me>
Subject: ruby internal technology question
Date: Fri, 27 Sep 2024 09:52:47 +0200
From: aotto1968 <aotto1968@t-online.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf8.newsdeef.eu!nnrp.usenet.blueworldhosting.com!!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
Newsgroups: comp.lang.ruby
Organization: A noiseless patient Spider
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 27 Sep 2024 09:52:47 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="255ed8f2a8bab8d02d50736cc833cfb9";
 logging-data="701138"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++LLeWRSrE/KRxufdCcCd4nVIKg/qzBtg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:QBryp5/Qlz32F5DOAjAg5l/4Ct0=
Content-Language: en-US