pike.git
/
src
/
builtin.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/builtin.cmod:3482:
ptrdiff_t i; if (end && (end->u.integer + 1 < len)) { len = end->u.integer + 1; } if (len > 0 && start && (start->u.integer > 0)) { INC_PCHARP(buf, start->u.integer); len -= start->u.integer; } if (len <= 0) {
-
push_
undefined
();
+
push_
int
(
-1
);
return; } if (UNLIKELY(THIS->str.s->size_shift == thirtytwobit)) { #if SIZEOF_INT_TYPE > 4 if (UNLIKELY((0x7fffffff < character) || (character < -0x80000000))) {
-
push_
undefined
();
+
push_
int
(
-1
);
return; } #endif } else if (UNLIKELY((1L<<(8<<THIS->str.s->size_shift)) <= character) || UNLIKELY(character < 0)) {
-
push_
undefined
();
+
push_
int
(
-1
);
return; } for (i = 0; i < len; i++) { p_wchar2 c = INDEX_PCHARP(buf, i); if (c == character) {
-
+
if(start)
+
i += start->u.integer;
push_int64(i); return; } }
-
push_
undefined
();
+
push_
int
(
-1
);
} INIT { struct Buffer_struct *str = THIS; memset( str, 0, sizeof( *str ) ); } EXIT gc_trivial;