From: Rod Kay <rod.kay@aulace.com>
Subject: Problem where a function is invoked once but called twice (when invocation is within an allocator).
Date: Wed, 4 May 2011 20:52:06 -0700 (PDT)
Date: 2011-05-04T20:52:06-07:00 [thread overview]
Message-ID: <b0b66310-3c0a-4d48-a3bc-2293931e60a6@s41g2000prb.googlegroups.com> (raw)
hi,
Any clues on why the use of an allocator would cause a single
function invocation to be called twice ?
the_Movie : media.Video.view := new_Movie;
the_next_Frame : openGL.Image :=
the_Movie.next_Frame; -- case 1
the_next_Frame : access openGL.Image := new
opengl.Image' (the_Movie.next_Frame); -- case 2
In the 1st case, the 'next_Frame' function is called once.
In the 2nd case, it is called twice.
'the_Movie' is an access to an object of tagged type
'media.Video.item'.
package media.Video is
type Item is tagged limited private;
type View is access all Item;
...
function next_Frame (Self : access Item) return opengl.Image;
...
end media.Video;
'opengl.Image' is an array with two unconstrained indices ...
package openGL is
...
type Image is array (Index_t range <>, Index_t range <>) of
Color;
end openGL;
In case it matters, the 'next_Frame' function contains a rendezvous
with a decoder task.
The decoder task is a component of the 'media.Video.item' record.
regards,
Rod.
next reply other threads:[~2011-05-05 3:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-05 3:52 Rod Kay [this message]
2011-05-05 5:43 ` Problem where a function is invoked once but called twice (when invocation is within an allocator) J-P. Rosen
2011-05-05 6:12 ` Rod Kay
2011-05-05 8:22 ` Yannick Duchêne (Hibou57)
2011-05-05 10:59 ` Rod Kay
2011-05-05 17:07 ` Florian Weimer
2011-05-06 0:49 ` Rod Kay
2011-05-06 23:41 ` Anh Vo
2011-05-07 1:38 ` Rod Kay
2011-05-07 9:06 ` Georg Bauhaus
2011-05-07 9:45 ` Rod Kay
2011-05-09 16:01 ` Anh Vo
2011-05-09 23:00 ` Dan
2011-05-10 0:14 ` Anh Vo
2011-05-10 0:24 ` Rod Kay
2011-05-10 0:55 ` Anh Vo
2011-05-11 17:23 ` Dan
2011-05-12 22:35 ` Rod Kay
2011-05-13 17:40 ` Ludovic Brenta
2011-05-10 0:21 ` Rod Kay
-- strict thread matches above, loose matches on Subject: below --
2011-05-14 0:27 Rod Kay
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox