[#62297] Re: [ruby-cvs:52906] nari:r45760 (trunk): * gc.c (gc_after_sweep): suppress unnecessary expanding heap. — Eric Wong <normalperson@...>
nari@ruby-lang.org wrote:
7 messages
2014/05/02
[#62307] Re: [ruby-cvs:52906] nari:r45760 (trunk): * gc.c (gc_after_sweep): suppress unnecessary expanding heap.
— SASADA Koichi <ko1@...>
2014/05/03
(2014/05/03 4:41), Eric Wong wrote:
[#62402] Re: [ruby-cvs:52906] nari:r45760 (trunk): * gc.c (gc_after_sweep): suppress unnecessary expanding heap.
— Eric Wong <normalperson@...>
2014/05/05
SASADA Koichi <ko1@atdot.net> wrote:
[#62523] [ruby-trunk - Feature #9632] [PATCH 0/2] speedup IO#close with linked-list from ccan — ko1@...
Issue #9632 has been updated by Koichi Sasada.
3 messages
2014/05/11
[#62556] doxygen (Re: Re: [ruby-trunk - Feature #9632] [PATCH 0/2] speedup IO#close with linked-list from ccan) — Tanaka Akira <akr@...>
2014-05-11 8:50 GMT+09:00 Eric Wong <normalperson@yhbt.net>:
3 messages
2014/05/13
[#62727] [RFC] vm_method.c (rb_method_entry_make): avoid freed me in m_tbl — Eric Wong <normalperson@...>
rb_unlink_method_entry may cause old_me to be swept before the new
7 messages
2014/05/24
[#63039] Re: [RFC] vm_method.c (rb_method_entry_make): avoid freed me in m_tbl
— SASADA Koichi <ko1@...>
2014/06/10
Hi,
[#63077] Re: [RFC] vm_method.c (rb_method_entry_make): avoid freed me in m_tbl
— Eric Wong <normalperson@...>
2014/06/10
SASADA Koichi <ko1@atdot.net> wrote:
[#63086] Re: [RFC] vm_method.c (rb_method_entry_make): avoid freed me in m_tbl
— SASADA Koichi <ko1@...>
2014/06/11
(2014/06/11 4:47), Eric Wong wrote:
[#63087] Re: [RFC] vm_method.c (rb_method_entry_make): avoid freed me in m_tbl
— Eric Wong <normalperson@...>
2014/06/11
SASADA Koichi <ko1@atdot.net> wrote:
[#62862] [RFC] README.EXT: document rb_gc_register_mark_object — Eric Wong <normalperson@...>
Any comment on officially supporting this as part of the C API?
5 messages
2014/05/30
[ruby-core:62754] [ruby-trunk - Feature #9863] Hide Float internal
From:
normalperson@...
Date:
2014-05-25 17:48:33 UTC
List:
ruby-core #62754
Issue #9863 has been updated by Eric Wong.
shyouhei@ruby-lang.org wrote:
> Feature #9863: Hide Float internal
Yes please. Probably a few more easy ones to hide:
RSymbol - new in 2.2, no compatibility risk?
RComplex - probably the same 3rd-party usage RRational
----------------------------------------
Feature #9863: Hide Float internal
https://bugs.ruby-lang.org/issues/9863#change-46872
* Author: Shyouhei Urabe
* Status: Open
* Priority: Normal
* Assignee:
* Category: core
* Target version: current: 2.2.0
----------------------------------------
~~~Patch
From 93f013d689abed19f4223f968e374046437b7fa7 Mon Sep 17 00:00:00 2001
From: "Urabe, Shyouhei" <shyouhei@ruby-lang.org>
Date: Sun, 25 May 2014 21:28:12 +0900
Subject: [PATCH] Hide Float internal
I'd like to make `struct RFloat` opaque.
We already have flonum. Looking into struct RFloat's internals have (I believe) zero use.
The struct is already accessed via appropriate macros/functions so hiding it is super-duper easy (see the patch). Passes test-all.
Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org>
---
ChangeLog | 6 ++++++
include/ruby/ruby.h | 6 +-----
internal.h | 7 +++++++
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7cc6e5b..3462eea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun May 25 21:12:15 2014 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * include/ruby/ruby.h (struct RFloat): no longer.
+
+ * internal.h (struct RFloat): moved here.
+
Sun May 25 20:31:49 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (ac_cv_func_{getcontext,setcontext}): do not
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index a39b958..e99b6db 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -807,10 +807,7 @@ struct RClass {
#define RMODULE_IS_REFINEMENT FL_USER3
#define RMODULE_INCLUDED_INTO_REFINEMENT FL_USER4
-struct RFloat {
- struct RBasic basic;
- double float_value;
-};
+struct RFloat;
double rb_float_value(VALUE);
VALUE rb_float_new(double);
@@ -1083,7 +1080,6 @@ struct RStruct {
#define ROBJECT(obj) (R_CAST(RObject)(obj))
#define RCLASS(obj) (R_CAST(RClass)(obj))
#define RMODULE(obj) RCLASS(obj)
-#define RFLOAT(obj) (R_CAST(RFloat)(obj))
#define RSTRING(obj) (R_CAST(RString)(obj))
#define RREGEXP(obj) (R_CAST(RRegexp)(obj))
#define RARRAY(obj) (R_CAST(RArray)(obj))
diff --git a/internal.h b/internal.h
index 071f3ed..bd2c4fd 100644
--- a/internal.h
+++ b/internal.h
@@ -412,6 +412,13 @@ struct RRational {
#define RRATIONAL(obj) (R_CAST(RRational)(obj))
+struct RFloat {
+ struct RBasic basic;
+ double float_value;
+};
+
+#define RFLOAT(obj) (R_CAST(RFloat)(obj))
+
/* class.c */
void rb_class_subclass_add(VALUE super, VALUE klass);
void rb_class_remove_from_super_subclasses(VALUE);
--
1.9.1
~~~
--
https://bugs.ruby-lang.org/