Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Nested structures and C extensions
Donnie Brasco
7/16/2007 3:43:00 AM
Hey everybody,
I've been wrestling with an issue in writing a Ruby extension with C.
I'm seeing that I can access (without Bus errors) top level attributes
in my initial structure that aren't nestled into another C structure
that is a member of this initial structure.
On the other hand, if I try to access the members of some structure that
is a member of the base structure after setting up a pointer to that
base structure via Data_Get_Struct, I get Bus errors. Even after
initializing all those variables in my C initializer, they don't come
back initialized when I pull them from a C implementation of an accessor
method.
I read some older posts under "Data_Make_Struct() considered dangerous?"
and the original poster described what may have been my problem. I'm
not really sure what the conclusion to that thread was, however. I'm
dealing with structs that contain multiple structs which, in turn,
contain other structs (along with regular primitive data such as
integers, etc.). I'm finding that the top-level structs give me easy,
Bus error-free access to things like integers and chars. Things get
hairy when I try to access structs from within instances of structs
after having created a pointer with Data_Get_Struct.
I'm not really interested in using SWIG, etc., so does anybody have any
ideas about how to go about fixing this problem?
Thanks in advance!
--
Posted via
http://www.ruby-...
.
1 Answer
The Peeler
12/8/2010 6:15:00 PM
0
On Wed, 8 Dec 2010 09:57:14 -0800 (PST), Michael Ejercito
<mejercit@hotmail.com> wrote:
>On Dec 8, 7:54?am, The Peeler <peeling...@invalid.admin> wrote:
>> On Wed, 8 Dec 2010 07:18:57 -0800 (PST), Michael Ejercito
>>
>>
>>
>> <mejer...@hotmail.com> wrote:
>> >On Dec 8, 6:47 am, The Peeler <peeling...@invalid.admin> wrote:
>> >> On Tue, 7 Dec 2010 20:27:53 -0800 (PST), Michael Ejercito
>>
>> >> <mejer...@hotmail.com> wrote:
>> >> > Do a search on "Nazi nithing" and "Holocaust".
>>
>> >> Do a search on "gook" and "flip", gook.
>>
>> >> > You are a Nazi.
>>
>> >> You are a gook.
>>
>> >> > As a Nazi, you are, above all else
>>
>> >> As a craven gook who sucks jew ass, you are, below all else.
>>
>> >> That is what you are, a gook, and there is nothing polite or
>> >> honest about it.
>> > ? You are a Nazi.
>>
>> You are a craven gook who sucks jew ass etc etc
> Bill explains what nithings are.
>
>
http://www.israpundit.com/20...
I explain what Bill is.
http://bill_levinstein_is_a_jew_asshole
<b'rissed>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Nested structures and C extensions
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password