unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* procedure->pointer bug
@ 2011-03-29 14:27 Tristan Colgate
  2011-03-29 21:36 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Tristan Colgate @ 2011-03-29 14:27 UTC (permalink / raw)
  To: guile-devel

Hi,

  Think I found a problem with void returns for pointer->procedure,
the following gives a segfault...

(use-modules (system foreign))

(define (myproc)
 (display "hello")(newline))

((pointer->procedure
  void
  (procedure->pointer void myproc '())
  '()))


replacing the void returns with an int gives the correct behaviour.

-- 
Tristan Colgate-McFarlane
----
  "You can get all your daily vitamins from 52 pints of guiness, and a
glass of milk"



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: procedure->pointer bug
  2011-03-29 14:27 procedure->pointer bug Tristan Colgate
@ 2011-03-29 21:36 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2011-03-29 21:36 UTC (permalink / raw)
  To: guile-devel

Hi,

Tristan Colgate <tcolgate@gmail.com> writes:

>   Think I found a problem with void returns for pointer->procedure,
> the following gives a segfault...

A SIGABRT actually.

> (use-modules (system foreign))
>
> (define (myproc)
>  (display "hello")(newline))
>
> ((pointer->procedure
>   void
>   (procedure->pointer void myproc '())
>   '()))

Fixed in 443f25dcff49f0a920d4149e29bcb3ae9f64ee02.

Thanks!

Ludo’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-29 21:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-29 14:27 procedure->pointer bug Tristan Colgate
2011-03-29 21:36 ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).