[#10492] Ruby 1.8.6 preview3 has been released — "Akinori MUSHA" <knu@...>

Hi,

26 messages 2007/03/04
[#10500] Re: Ruby 1.8.6 preview3 has been released — Hugh Sasse <hgs@...> 2007/03/05

On Mon, 5 Mar 2007, Akinori MUSHA wrote:

[#10507] Dynamic Array#join with block — <noreply@...>

Patches item #9055, was opened at 2007-03-05 19:57

12 messages 2007/03/05
[#10520] Re: [ ruby-Patches-9055 ] Dynamic Array#join with block — Nobuyoshi Nakada <nobu@...> 2007/03/06

Hi,

[#10594] grave bug in 1.8.6's thread implementation — Sylvain Joyeux <sylvain.joyeux@...4x.org>

In ext/thread/thread.c, remove_one leaves the list in an inconsistent state.

15 messages 2007/03/14
[#10596] Re: [PATCH] grave bug in 1.8.6's thread implementation — MenTaLguY <mental@...> 2007/03/14

On Thu, 15 Mar 2007 00:15:57 +0900, Sylvain Joyeux <sylvain.joyeux@m4x.org> wrote:

[#10597] Re: [PATCH] grave bug in 1.8.6's thread implementation — Sylvain Joyeux <sylvain.joyeux@...4x.org> 2007/03/14

> > The fix is in thread-mutex-remove_one.diff.

[#10598] Re: [PATCH] grave bug in 1.8.6's thread implementation — MenTaLguY <mental@...> 2007/03/14

On Thu, 15 Mar 2007 01:19:04 +0900, Sylvain Joyeux <sylvain.joyeux@m4x.org> wrote:

[#10599] Re: [PATCH] grave bug in 1.8.6's thread implementation — Sylvain Joyeux <sylvain.joyeux@...4x.org> 2007/03/14

On Wednesday 14 March 2007 17:29, MenTaLguY wrote:

[#10600] Re: [PATCH] grave bug in 1.8.6's thread implementation — MenTaLguY <mental@...> 2007/03/14

On Thu, 15 Mar 2007 01:48:42 +0900, Sylvain Joyeux <sylvain.joyeux@m4x.org> wrote:

[#10615] Multiton in standard library — TRANS <transfire@...>

Hi--

16 messages 2007/03/15
[#10619] Re: Multiton in standard library — Tom Pollard <tomp@...> 2007/03/16

[#10620] Re: Multiton in standard library — TRANS <transfire@...> 2007/03/16

On 3/15/07, Tom Pollard <tomp@earthlink.net> wrote:

[#10646] Marshal.dump shouldn't complain about singletons if the _dump method is defined — <noreply@...>

Bugs item #9376, was opened at 2007-03-19 15:58

12 messages 2007/03/19
[#10647] Re: [ ruby-Bugs-9376 ] Marshal.dump shouldn't complain about singletons if the _dump method is defined — Urabe Shyouhei <shyouhei@...> 2007/03/19

noreply@rubyforge.org wrote:

[#10648] Re: [ ruby-Bugs-9376 ] Marshal.dump shouldn't complain about singletons if the _dump method is defined — Sylvain Joyeux <sylvain.joyeux@...4x.org> 2007/03/19

On Monday 19 March 2007 18:01, Urabe Shyouhei wrote:

[#10651] Re: [ ruby-Bugs-9376 ] Marshal.dump shouldn't complain about singletons if the _dump method is defined — Yukihiro Matsumoto <matz@...> 2007/03/19

Hi,

[#10665] Re: [ ruby-Bugs-9376 ] Marshal.dump shouldn't complain about singletons if the _dump method is defined — "Chris Carter" <cdcarter@...> 2007/03/20

On 3/19/07, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:

[#10712] Ruby Method Signatures (was Re: Multiton in standard library) — "Rick DeNatale" <rick.denatale@...>

On 3/19/07, TRANS <transfire@gmail.com> wrote:

10 messages 2007/03/21
[#10715] Re: Ruby Method Signatures (was Re: Multiton in standard library) — Jos Backus <jos@...> 2007/03/22

On 3/19/07, TRANS <transfire@gmail.com> wrote:

[#10798] Virtual classes and 'real' classes -- why? — "John Lam (CLR)" <jflam@...>

I was wondering if someone could help me understand why there's a parallel =

12 messages 2007/03/28
[#10799] Re: Virtual classes and 'real' classes -- why? — MenTaLguY <mental@...> 2007/03/28

On Thu, 29 Mar 2007 04:44:16 +0900, "John Lam (CLR)" <jflam@microsoft.com> wrote:

Re: Bugfix: Extension Compile Error with 1.8.6

From: "Nobuyoshi Nakada" <nobu@...>
Date: 2007-03-14 09:48:31 UTC
List: ruby-core #10589
Hi,

At Wed, 14 Mar 2007 17:02:13 +0900,
Lothar Scholz wrote in [ruby-core:10588]:
> >> at the top of the file otherwise the "st_table* locals" will throw an
> >> error if the extension has not included "st.h" before "node.h".
>
> NN> replace "st_table" with "struct st_table", and insert "struct
> NN> st_table;" before the structure, I guess.
>
> No this doesn't help the problem is the line below.  "VALUE thread;"
> If i replace this with another identifier like "thread_" it doesn't
> have any problems.

Sorry, I couldn't understand the error messages in your second post.

Although your compiler seems to be odd, "thread" is a too common name
anyway.  It should have been renamed as "rb_thread" or such when it'd
been exposed, I guess.


Index: eval.c
===================================================================
--- eval.c	(revision 12059)
+++ eval.c	(working copy)
@@ -244,6 +244,6 @@ static int scope_vmode;
 #define SCOPE_TEST(f) (scope_vmode&(f))

-VALUE (*ruby_sandbox_save)(struct thread *) = NULL;
-VALUE (*ruby_sandbox_restore)(struct thread *) = NULL;
+VALUE (*ruby_sandbox_save)(rb_thread_t) = NULL;
+VALUE (*ruby_sandbox_restore)(rb_thread_t) = NULL;
 NODE* ruby_current_node;
 int ruby_safe_level = 0;
@@ -9828,6 +9828,4 @@ extern VALUE rb_last_status;
 #endif

-/* typedef struct thread * rb_thread_t; */
-
 #define THREAD_RAISED 0x200	 /* temporary flag */
 #define THREAD_TERMINATING 0x400 /* persistent flag */
@@ -9852,5 +9850,5 @@ struct thread_status_t {
     int safe;

-    enum thread_status status;
+    enum rb_thread_status status;
     int wait_for;
     int fd;
@@ -9954,5 +9952,5 @@ rb_trap_eval(cmd, sig, safe)
 static const char *
 thread_status_name(status)
-    enum thread_status status;
+    enum rb_thread_status status;
 {
     switch (status) {
@@ -11012,5 +11010,5 @@ rb_thread_join(th, limit)
     double limit;
 {
-    enum thread_status last_status = THREAD_RUNNABLE;
+    enum rb_thread_status last_status = THREAD_RUNNABLE;

     if (rb_thread_critical) rb_thread_deadlock();
@@ -11395,5 +11393,5 @@ VALUE
 rb_thread_stop()
 {
-    enum thread_status last_status = THREAD_RUNNABLE;
+    enum rb_thread_status last_status = THREAD_RUNNABLE;

     rb_thread_critical = 0;
@@ -11659,5 +11657,5 @@ rb_thread_group(thread)

 #define THREAD_ALLOC(th) do {\
-    th = ALLOC(struct thread);\
+    th = ALLOC(struct rb_thread);\
 \
     th->next = 0;\
@@ -11824,5 +11822,5 @@ rb_thread_start_0(fn, arg, th)
     volatile VALUE thread = th->thread;
     struct BLOCK *volatile saved_block = 0;
-    enum thread_status status;
+    enum rb_thread_status status;
     int state;

Index: node.h
===================================================================
--- node.h	(revision 12059)
+++ node.h	(working copy)
@@ -391,5 +391,5 @@ typedef jmp_buf rb_jmpbuf_t;
 #endif

-enum thread_status {
+enum rb_thread_status {
     THREAD_TO_KILL,
     THREAD_RUNNABLE,
@@ -398,8 +398,9 @@ enum thread_status {
 };

-typedef struct thread * rb_thread_t;
+typedef struct rb_thread *rb_thread_t;
+struct st_table;

-struct thread {
-    struct thread *next, *prev;
+struct rb_thread {
+    struct rb_thread *next, *prev;
     rb_jmpbuf_t context;
 #if (defined _WIN32 && !defined _WIN32_WCE) || defined __CYGWIN__
@@ -442,5 +443,5 @@ struct thread {
     int safe;

-    enum thread_status status;
+    enum rb_thread_status status;
     int wait_for;
     int fd;
@@ -456,5 +457,5 @@ struct thread {
     VALUE thgroup;

-    st_table *locals;
+    struct st_table *locals;

     VALUE thread;
@@ -463,6 +464,6 @@ struct thread {
 };

-extern VALUE (*ruby_sandbox_save)(struct thread *);
-extern VALUE (*ruby_sandbox_restore)(struct thread *);
+extern VALUE (*ruby_sandbox_save)(rb_thread_t);
+extern VALUE (*ruby_sandbox_restore)(rb_thread_t);
 extern rb_thread_t curr_thread;
 extern rb_thread_t main_thread;


-- 
Nobu Nakada


In This Thread