Hi Benoit,<div><br></div><div>I am a bit perplexed. I have some code that works and some that doesn't... I think I have been looking at the code too long to see the issue. So I was hoping your eyes might help.</div><div>
<br></div><div>I have used:</div><div><br></div><div>#define THIS ((GSLCOMPLEX *) _object) -- in c_complex.h</div><div><br></div><div>to get a pointer to the current object of type GSLCOMPLEX. </div><div><br></div><div>
Next I use:</div>
<div><br></div><div>THIS->number.real;</div><div><br></div><div>to access the value stored in the real member of the number structure. The number structure is a member of the GSLCOMPLEX structure</div><div><br></div><div>
The structures are defined as below:</div><div><br></div><div><div>typedef</div><div> struct __GSLCOMPLEXNUM</div><div> {</div><div> double real;</div><div> double imagined;</div><div> }</div><div>
GSLCOMPLEXNUM;</div>
<div><br></div><div>typedef</div><div> struct __GSLCOMPLEX</div><div> {</div><div> GB_BASE ob;</div><div> GSLCOMPLEXNUM number;</div><div> }</div><div> GSLCOMPLEX;</div></div><div><div><br></div>
<div>This seems to work when I am simply passing a value to store in the property but causes seg faults when I try to pass the value of THIS->number.real to a function. </div><div>I know I have missed something very elementary but simply can't see it at this moment... Once you respond I know I will be kicking myself for not seeing it!</div>
<div><br></div><div>What I need to do is pass the values stored in GSLCOMPLEX->number.real, and GSLCOMPLEX->number.imagined to c function. </div><div><br></div><div>My guess is that my method of getting the current object is not working as at times I seem to get a null value for THIS and a value of 0x8 for THIS->number.</div>
<div><br></div><div><br></div><div>Thanks for the help!</div><div><br></div><div><br></div>-- <br>If you ask me if it can be done. The answer is YES, it can always be done. The correct questions however are... What will it cost, and how long will it take?<br>
</div>