pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
2000-01-24
2000-01-24 14:00:30 by Fredrik Noring <noring@nocrew.org>
7b5804ceb3e8a6725bce7d38d4bd2fe4629bbe70 (
17
lines) (+
13
/-
4
)
[
Show
|
Annotate
]
Branch:
7.9
Added some new ideas on _has_index and _has_value.
Rev: src/builtin_functions.c:1.231
5:
\*/ /**/ #include "global.h"
-
RCSID("$Id: builtin_functions.c,v 1.
230
2000/01/24
03
:
03
:
27
mast
Exp $");
+
RCSID("$Id: builtin_functions.c,v 1.
231
2000/01/24
14
:
00
:
30
noring
Exp $");
#include "interpret.h" #include "svalue.h" #include "pike_macros.h"
501:
break; case T_OBJECT:
-
/* FIXME: If the object behaves like an array, it will
-
throw
an
error for non-valid indices.
Maybe
this
is
-
the
way
to
go
(
faster
)
?
+
/* FIXME: If the object behaves like an array, it will
throw
an
+
error for non-valid indices.
Therefore
it's
not a good idea
+
to use
the
index
operator.
+
+
Maybe we should use object->_has_index
(
index
)
provided that
+
the object implements it.
+
/Noring */ /* Fall-through. */
545:
with `values' in case of objects. The problem is that we cannot use `search' directly since it's undefined weather it returns -1 (array) or 0 (mapping) during e.g. some data type emulation.
+
+
Maybe we should use object->_has_value(value) provided that
+
the object implements it.
+
/Noring */ /* Fall-through. */