On Sun, 2005-05-29 at 16:39 +0200, A. Pagaltzis wrote:
If there’s only a string value in a scalar, Perl converts it to an integer before doing any math, as we all know. So values < 2**32 automatically work, but there’s no actual difference to providing integers. Did you actually test with values that would overflow a Perl integer?
Yeah.  And it seems to work.  This
  Glib::Timeout -> add(5000, sub {
    my ($format, $pos) = $spider -> query("position", "time");
    warn "$pos, ", $pos + 5 * GST_SECOND;
    $sink -> seek([qw/method-set flag-flush time/], $pos + 5 * GST_SECOND);
    return 1;
  });
prints:
  5265102040, 10265102040 at player.pl line 48.
  15127777777, 20127777777 at player.pl line 48.
  24797437641, 29797437641 at player.pl line 48.
  ...
GST_SECOND is 1_000_000_000.  For reference: 2**32 is 4_294_967_296.
I'm attaching the whole test program I used.
-- 
Bye,
-Torsten
Attachment:
player.pl
Description: Perl program