Re: GtkImageView
- From: muppet <scott asofyet org>
- To: gtk2-perl List <gtk-perl-list gnome org>
- Subject: Re: GtkImageView
- Date: Mon, 17 Dec 2007 14:21:55 -0500
On Dec 17, 2007, at 8:11 AM, Jeffrey Ratcliffe wrote:
OK. Almost working. As my Perl is much better than my C these days, I
just can't find the correct syntax:
IImageTool.xs: In function `newSVDrawSettings':
IImageTool.xs:33: error: cannot convert to a pointer type
IImageTool.xs: In function `SvDrawSettings':
IImageTool.xs:62: error: incompatible types in assignment
where the relevant lines are:
hv_store (hv, "zoom_rect", 9, newSVGdkRectangle (settings-
>zoom_rect), 0);
Take the address of the zoom_rect structure member like this:
newSVGdkRectangle (&settings->zoom_rect)
and
if (svp) settings->zoom_rect = SvGdkRectangle (*svp);
You need to dereference the pointed that SvGdkRectangle() returns.
settings->zoom_rect = *SvGdkRectangle (*svp);
SvGdkRectangle() is implemented as gperl_get_boxed_check(), which does
not allow undef, so you should not get a NULL pointer back from it
unless something is quite wrong.
--
The Master in the art of living makes little distinction between his
work and his play, his labor and his leisure, his mind and his body,
his education and his recreation, his love and his religion. He hardly
knows which is which. He simply pursues his vision of excellence in
whatever he does, leaving others to decide whether he is working or
playing. To him he is always doing both.
-- Zen Philosophy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]