pike.git / src / modules / Parser / pike.c

version» Context lines:

pike.git/src/modules/Parser/pike.c:64:   #undef CHAR   #undef PUSH_TOKEN      static void do_free_arrayptr( struct array **x )   {    free_array( *x );   }      static void f_tokenize( INT32 args )   { -  struct array *res = allocate_array_no_init( 0, 128 ); +  struct array *res;    struct pike_string *left_s = 0; /* Make gcc happy. */    int left;    ONERROR tmp;       if( Pike_sp[-1].type != PIKE_T_STRING )    Pike_error("Expected string argument\n");    -  +  if( Pike_sp[-1].u.string->len==0 ) +  { +  pop_n_elems(args); +  push_array(&empty_array); +  push_string(empty_pike_string); +  f_aggregate(2); +  return; +  } +  +  res = allocate_array_no_init( 0, 128 );    SET_ONERROR(tmp, do_free_arrayptr, &res);       switch( Pike_sp[-1].u.string->size_shift )    {    case 0:    left=tokenize0(&res,(p_wchar0*)Pike_sp[-1].u.string->str,Pike_sp[-1].u.string->len);    left_s = make_shared_binary_string0( (p_wchar0*)Pike_sp[-1].u.string->str+left,    Pike_sp[-1].u.string->len-left);    break;    case 1: