pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1:   /* -*- c -*- -  * $Id: builtin.cmod,v 1.50 2001/06/30 02:02:43 mast Exp $ +  * $Id: builtin.cmod,v 1.51 2001/07/01 13:12:46 grubba Exp $    */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   #include "opcodes.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"
pike.git/src/builtin.cmod:1474:    }    string_builder_putchar(&ret,    DO_NOT_WARN((INT32)ch));    s++;    length--;    }       RETURN finish_string_builder(&ret);    }    +  PIKEFUN array(string) _encode() +  { +  size_t i; +  for (i=0; i < THIS->sz; i++) { +  ref_push_string(THIS->v[i].ind); +  } +  f_aggregate(DO_NOT_WARN((INT32)THIS->sz)); +  for (i=0; i < THIS->sz; i++) { +  ref_push_string(THIS->v[i].val); +  } +  f_aggregate(DO_NOT_WARN((INT32)THIS->sz)); +  f_aggregate(2); +  } +  +  PIKEFUN void _decode(array(array(string)) encoded) +  { +  INT32 i; +  +  for (i=0; i < encoded->size; i++) { +  push_svalue(encoded->item + i); +  stack_swap(); +  } +  pop_stack(); +  +  f_multi_string_replace_create(i); +  } +     INIT    {    THIS->v = NULL;    THIS->v_sz = 0;    THIS->sz = 0;    }       EXIT    {    if (THIS->v) {