Branch: Tag:

1999-11-08

1999-11-08 13:21:06 by Per Hedbor <ph@opera.com>

Added a __parse_pike_type function, calls parse_type

Rev: src/builtin_functions.c:1.203

5:   \*/   /**/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.202 1999/11/07 23:09:26 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.203 1999/11/08 13:21:06 per Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
1189:    push_string(out);   }    + static void f_parse_pike_type( INT32 args ) + { +  struct pike_string *res; +  if( sp[-1].type != T_STRING || +  sp[-1].u.string->size_shift ) +  error( "__parse_type requires a 8bit string as its first argument\n" ); +  res = parse_type( STR0(sp[-1].u.string) ); +  pop_stack(); +  push_string( res ); + } +    void f_all_constants(INT32 args)   {    pop_n_elems(args);
5324:   /* function(string,int|void:string) */    ADD_EFUN("utf8_to_string", f_utf8_to_string,tFunc(tStr tOr(tInt,tVoid),tStr), OPT_TRY_OPTIMIZE);    +  +  ADD_EFUN("__parse_pike_type", f_parse_pike_type,tFunc(tStr,tStr),OPT_TRY_OPTIMIZE); +    #ifdef HAVE_LOCALTIME      /* function(int:mapping(string:int)) */