pike.git/
src/
modules/
Parser/
pike.c
Branch:
Tag:
Non-build tags
All tags
No tags
2005-03-16
2005-03-16 00:44:11 by Martin Nilsson <mani@lysator.liu.se>
00936a84ca79bb581e60a8aa7559a78de4caa918 (
13
lines) (+
12
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
Give empty strings the short cut.
Rev: src/modules/Parser/pike.c:1.3
71:
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;
79:
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 )