path: root/enumerator.c
diff options
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-24 21:07:14 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-24 21:07:14 +0000
commit7e669f40bed629ac746ac62ece63e3d4ce6ff039 (patch)
treebb8b4e479535c93dd39e72c0ea005676da7579ff /enumerator.c
parent0a0b71f3bdc3d2730fd233f89d1219aab8204c47 (diff)
ruby/ruby.h: remove unnecessary exports from C-API
Needlessly exporting can reduce performance locally and increase binary size. Increasing the footprint of our C-API larger is also detrimental to our development as it encourages tighter coupling with our internals; making it harder for us to preserve compatibility. If some parts of the core codebase needs access to globals, internal.h should be used instead of anything in include/ruby/*. "Urabe, Shyouhei" <> wrote: > On Thu, Jan 18, 2018 at 7:33 PM, Eric Wong <> wrote: > > wrote: > >> > >> > >> export rb_mFConst > > > > Why are we exporting all these and making the public C-API bigger? > > If anything, we should make these static. Thanks. > > No concrete reason, except they have already been externed in 2.5. > These variables had lacked declarations so far, which resulted in their > visibility to be that of extern. The commit is just confirming the status quo. > > I'm not against to turn them into static. This reverts changes from r61910, r61909, r61908, r61907, and r61906. * transcode.c (rb_eUndefinedConversionError): make static (rb_eInvalidByteSequenceError): ditto (rb_eConverterNotFoundError): ditto * process.c (rb_mProcGID, rb_mProcUid, rb_mProcID_Syscall): ditto * file.c (rb_mFConst): ditto * error.c (rb_mWarning, rb_cWarningBuffer): ditto * enumerator.c (rb_cLazy): ditto [Misc #14381] git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enumerator.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/enumerator.c b/enumerator.c
index 95801d2..0c2ce19 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -102,7 +102,7 @@
VALUE rb_cEnumerator;
-VALUE rb_cLazy;
+static VALUE rb_cLazy;
static ID id_rewind, id_new, id_yield, id_to_enum;
static ID id_next, id_result, id_lazy, id_receiver, id_arguments, id_memo, id_method, id_force;
static VALUE sym_each, sym_cycle;