🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: nl.comp.programmeren
Article #711

Re: GTK programma & parallelle poort -> segmentation fault

#711
From: Henk Huitema
Date: Mon, 22 Nov 1999 00:00
18 lines
1531 bytes
Bart Vandewoestyne wrote:
> 
> menuitem = CreateMenuItem (menuMotorSub, "Turn Left Half Step", NULL,
>                         "Turn Left Half Step",
>                         GTK_SIGNAL_FUNC (turn_left_half_step),
>                         (gpointer) portstatus);
> 
> waarbij portstatus gedefineerd is als:
> 
> int portstatus;
> 
Met "(gpointer) portstatus" cast je een int naar void *. Verderop cast
je hem weer naar een (int *). Dat gaat dus niet goed.... 
"(gpointer) &portstatus" zou wel moeten werken.

-- 
moi,
Henk
Technical Details
Message-ID: <38399284.B7A38A26@cwi.nl>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <383885E6.AC1CA383@skynet.be>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: 107324,ef82ca5dd635fd8
X-Google-Attributes: gid107324,public
X-Google-Thread: 100a19,ef82ca5dd635fd8
X-Google-Attributes: gid100a19,public
X-Google-Thread: fcea4,ef82ca5dd635fd8
X-Google-Attributes: gidfcea4,public
X-Google-Thread: fb7d6,ef82ca5dd635fd8
X-Google-Attributes: gidfb7d6,public
From: Henk Huitema <huitema@cwi.nl>
Subject: Re: GTK programma & parallelle poort -> segmentation fault
Date: 1999/11/22
Message-ID: <38399284.B7A38A26@cwi.nl>
X-Deja-AN: 551731446
Content-Transfer-Encoding: 7bit
References: <383885E6.AC1CA383@skynet.be>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: newsmaster@worldonline.nl
X-Trace: news.worldonline.nl 943296504 19428 195.241.237.82 (22 Nov 1999 18:48:24 GMT)
Organization: ...
Mime-Version: 1.0
NNTP-Posting-Date: 22 Nov 1999 18:48:24 GMT
Newsgroups: nl.comp.programmeren,be.comp.os.linux,nl.comp.os.linux,be.comp.programming