Branch: Tag:

1998-01-29

1998-01-29 18:10:53 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fix for ctime().

Rev: src/builtin_functions.c:1.64

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.63 1998/01/29 06:02:28 hubbe Exp $"); + RCSID("$Id: builtin_functions.c,v 1.64 1998/01/29 18:10:53 grubba Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
109:      void f_ctime(INT32 args)   { -  INT32 i; +  time_t i;    if(!args)    error("Too few arguments to ctime()\n");    if(sp[-args].type != T_INT)    error("Bad argument 1 to ctime()\n"); -  i=sp[-args].u.integer; +  i=(time_t)sp[-args].u.integer;    pop_n_elems(args); -  push_string(make_shared_string(ctime((time_t *)&i))); +  push_string(make_shared_string(ctime(&i)));   }      void f_lower_case(INT32 args)