pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1:   /* -*- c -*-   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: builtin.cmod,v 1.214 2008/06/24 20:07:58 grubba Exp $ + || $Id: builtin.cmod,v 1.215 2008/06/27 11:28:39 grubba Exp $   */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"
pike.git/src/builtin.cmod:579:    HANDLE_FLOAT_FACTOR ("time_ratio", gc_time_ratio);    HANDLE_FLOAT_FACTOR ("garbage_ratio_high", gc_garbage_ratio_high);    HANDLE_FLOAT_FACTOR ("average_slowness", gc_average_slowness);      #undef HANDLE_PARAM   #undef HANDLE_FLOAT_FACTOR       REF_RETURN params;   }    - /*! @decl int m_generation(mapping m) -  *! -  *! Get the content generation for the mapping @[m]. -  */ - PIKEFUN int m_generation(mapping|object m) -  efun; - { -  if (m->type == T_MAPPING) { -  RETURN mapping_generation(m->u.mapping); -  } -  if (m->type == T_OBJECT && m->u.object->prog) { -  struct object *o = m->u.object; -  struct program *p = o->prog; -  int id_level = p->inherits[m->subtype].identifier_level; -  int fun; -  p = p->inherits[m->subtype].prog; -  /* NOTE: Fake lfun! */ -  fun = low_find_lfun(p, LFUN__M_GENERATION); -  if (fun >= 0) { -  apply_low(o, fun + id_level, 0); -  stack_pop_n_elems_keep_top(args); -  return; -  } -  } -  SIMPLE_BAD_ARG_ERROR("m_generation", 1, "mapping"); - } -  +    /*! @decl string ctime(int timestamp)    *!    *! Convert the output from a previous call to @[time()] into a readable    *! string containing the current year, month, day and time.    *!    *! Like @[localtime], this function might throw an error if the    *! ctime(2) call failed on the system. It's platform dependent what    *! time ranges that function can handle, e.g. Windows doesn't handle    *! a negative @[timestamp].    *!