bugGuile - Bugs: bug #19807, srfi-19: current-time return type...

 
 

bug #19807: srfi-19: current-time return type inconsistency

Submitter:  None
Submitted:  Sat 05 May 2007 02:23:40 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 09 May 2007 09:17:38 PM UTC, comment #2: 

This is now fixed in both the `HEAD' and 1.8 CVS branches.

Thanks for your report!

Ludovic.

Ludovic Courtès <civodul>
Group administrator
Sun 06 May 2007 08:36:59 AM UTC, comment #1: 

A further point:

The shadowed version of make-time-process calls make-time with its positional parameters in the wrong order:

guile> (use-modules (srfi srfi-19))
guile> (current-time time-process)
#<time type: time-process nanosecond: 0 second: 350000000>

Scott

Anonymous
Sat 05 May 2007 02:23:40 PM UTC, original submission:  

The procedure current-time in srfi-19 returns a time record:

  guile> (current-time)
  #<time type: time-utc nanosecond: ...

...except when the time type time-process is requested in which case a list is returned:

  guile> (current-time time-process)
  (time-process ...

This causes other functionality to break, for example time-difference:

  guile> (time-difference
           (current-time)
           (current-time))
  #<time type: time-duration nanosecond: ...

  guile> (time-difference
           (current-time time-process)
           (current-time time-process))
  ...
  ... not-a-record (time-process ...
  ABORT: (misc-error)

Suggested fix:

There are two definitions of priv:current-time-process in srfi-19.scm. The first returns a time record, and second returns the list. Commenting out the second gives me the behavior I expected.

thanks for your time,
Scott Shedden

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by civodul (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-05-09 civodul Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code