[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Pointer Attribute
From:       "Jay L." <jlaura () asu ! edu>
Date:       2016-10-26 22:51:26
Message-ID: CA+bfmPvmW0gnzKpzpoVfCR4QuX1zpUbbf11dVi8bcZhPc2bKEw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks for the suggestion to use the Force version.  Much cleaner.

Inside of %SetCode, it does not appear that the sipErr variable is
available.  I tried simply replacing the argument with `int err;` and then
`*err` in the signature.  Still segfaulting.

Any other suggestions of what to check?  My next test will be to move this
code into get and set methods to have access to sipErr, but perhaps
something else could be causing this?

(The previous code is unchanged except the final arg 0 is replaced with
*err.)

Thanks for the assistance,
J

On Wed, Oct 26, 2016 at 2:53 PM, Phil Thompson <phil@riverbankcomputing.com>
wrote:

> On 26 Oct 2016, at 6:39 pm, Jay L. <jlaura@asu.edu> wrote:
> >
> > Phil,
> >
> > Thanks for the pointers.  Here is the resultant code.
> >
> > I have added the check for length and am now allocating the h_data array
> on the heap.  I have not added error check for any previous array, but the
> point is appreciated.
> >
> > In the below code, I am segfaulting on the sipConvertToType call and am
> not sure why.  The sipTypePoint definition is the lowest code block.  I do
> not have any TypeCode defined for the SiftPoint, but all of the types are
> standard so I think custom code is not needed there?
> >
> >
> > The small debug block (commented out) is working as a replacement for
> the sipConvertToType call.
>
> The last argument to sipConvertToType() cannot be 0.
>
> Also using sipForceConvertToType() is less code.
>
> Phil

[Attachment #5 (text/html)]

<div dir="ltr">Thanks for the suggestion to use the Force version.   Much cleaner.  \
<div><br></div><div>Inside of %SetCode, it does not appear that the sipErr variable \
is available.   I tried simply replacing the argument with `int err;` and then `*err` \
in the signature.   Still segfaulting.  </div><div><br></div><div>Any other \
suggestions of what to check?   My next test will be to move this code into get and \
set methods to have access to sipErr, but perhaps something else could be causing \
this?</div><div><br></div><div>(The previous code is unchanged except the final arg 0 \
is replaced with *err.)</div><div><br></div><div>Thanks for the assistance,  \
</div><div>J</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, \
Oct 26, 2016 at 2:53 PM, Phil Thompson <span dir="ltr">&lt;<a \
href="mailto:phil@riverbankcomputing.com" \
target="_blank">phil@riverbankcomputing.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="">On 26 Oct 2016, at 6:39 pm, Jay L. &lt;<a \
href="mailto:jlaura@asu.edu">jlaura@asu.edu</a>&gt; wrote:<br> &gt;<br>
&gt; Phil,<br>
&gt;<br>
&gt; Thanks for the pointers.   Here is the resultant code.<br>
&gt;<br>
&gt; I have added the check for length and am now allocating the h_data array on the \
heap.   I have not added error check for any previous array, but the point is \
appreciated.<br> &gt;<br>
&gt; In the below code, I am segfaulting on the sipConvertToType call and am not sure \
why.   The sipTypePoint definition is the lowest code block.   I do not have any \
TypeCode defined for the SiftPoint, but all of the types are standard so I think \
custom code is not needed there?<br> &gt;<br>
&gt;<br>
&gt; The small debug block (commented out) is working as a replacement for the \
sipConvertToType call.<br> <br>
</span>The last argument to sipConvertToType() cannot be 0.<br>
<br>
Also using sipForceConvertToType() is less code.<br>
<span class="HOEnZb"><font color="#888888"><br>
Phil</font></span></blockquote></div><br></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic