[#237] object.c ruby.h (fwd) — Robert Skarwecki <skaav@...>

Hello everybody,

42 messages 2002/07/24
[#239] Re: [PATCH] object.c ruby.h (fwd) — GOTO Kentaro <gotoken@...> 2002/07/24

At Thu, 25 Jul 2002 00:02:28 +0900,

[#240] Re: [PATCH] object.c ruby.h (fwd) — Dave Thomas <Dave@...> 2002/07/24

GOTO Kentaro <gotoken@notwork.org> writes:

[#246] Re: [PATCH] object.c ruby.h (fwd) — GOTO Kentaro <gotoken@...> 2002/07/25

At Thu, 25 Jul 2002 05:05:46 +0900,

[#247] Re: [PATCH] object.c ruby.h (fwd) — Dave Thomas <Dave@...> 2002/07/25

GOTO Kentaro <gotoken@notwork.org> writes:

[#248] Re: [PATCH] object.c ruby.h (fwd) — nobu.nokada@... 2002/07/25

Hi,

[#249] Re: [PATCH] object.c ruby.h (fwd) — Dave Thomas <Dave@...> 2002/07/25

nobu.nokada@softhome.net writes:

[#250] Re: [PATCH] object.c ruby.h (fwd) — nobu.nokada@... 2002/07/25

Hi,

[#252] Re: [PATCH] object.c ruby.h (fwd) — GOTO Kentaro <gotoken@...> 2002/07/25

At Fri, 26 Jul 2002 03:11:02 +0900,

[#253] Re: [PATCH] object.c ruby.h (fwd) — Dave Thomas <Dave@...> 2002/07/25

GOTO Kentaro <gotoken@notwork.org> writes:

Re: A couple of questions on writing extensions

From: Matthew Bloch <mattbee@...>
Date: 2002-07-26 03:22:41 UTC
List: ruby-core #259
On Friday 26 July 2002 01:56, nobu.nokada@softhome.net wrote:
> > which is nothing to do with my converted class, but the error implies
> > 'key' is somehow corrupt or of the wrong type, where the same code worked
> > before. This exception seems to be thrown from different points depending
> > on timing (though more often than not in a simple call to a logger),
> > which is pretty difficult to track down.
>
> I vote GC issue.  How do you define mark/free functions for
> Data_{Make,Wrap}_Struct?  Could you show us the source?

You're right, I think it was a misunderstanding with the mark/free functions 
specified by Data_Wrap_Struct.  I assumed they were passed VALUEs whereas in 
fact they're passed pointers to your data structure (you have to look at one 
of the examples in the source, ext/stringio to find this out; it's not 
explicit in README.EXT nor the pickaxe book).  As it happened, the program 
continued as normal for a while but presumably a piece of memory got doubly 
allocated to cause these weird effects.  Anyhow, it's all sorted now; thanks 
for the push in the right direction.

-- 
Matthew       > http://www.soup-kitchen.net/
              > ICQ 19482073

In This Thread

Prev Next