pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
2001-02-20
2001-02-20 00:08:19 by Henrik Grubbström (Grubba) <grubba@grubba.org>
ac04551e5e80defb4e13d2a193175d38bcfd459c (
23
lines) (+
13
/-
10
)
[
Show
|
Annotate
]
Branch:
7.9
Some more struct pike_type fixes.
Rev: src/builtin_functions.c:1.343
5:
\*/ /**/ #include "global.h"
-
RCSID("$Id: builtin_functions.c,v 1.
342
2001/02/
19
23
:
49
:
57
grubba Exp $");
+
RCSID("$Id: builtin_functions.c,v 1.
343
2001/02/
20
00
:
08
:
19
grubba Exp $");
#include "interpret.h" #include "svalue.h" #include "pike_macros.h"
2378:
/* this should probably be moved to pike_constants.c or something */ #define FIX_OVERLOADED_TYPE(n, lf, X) fix_overloaded_type(n,lf,X,CONSTANT_STRLEN(X))
+
/* FIXME: This function messes around with the implementation of pike_type,
+
* and should probably be in pike_types.h instead.
+
*/
static node *fix_overloaded_type(node *n, int lfun, const char *deftype, int deftypelen) { node **first_arg;
-
struct pike_
string
*t,*t2;
+
struct pike_
type
*t,
*t2;
first_arg=my_get_arg(&_CDR(n), 0); if(!first_arg) return 0; t=first_arg[0]->type;
2511:
#endif /* PIKE_DEBUG */ do { if (types[argno]) {
-
struct pike_
string
*t = or_pike_types(types[argno], arg->type, 0);
+
struct pike_
type
*t = or_pike_types(types[argno], arg->type, 0);
free_type(types[argno]); types[argno] = t; #ifdef PIKE_DEBUG
2756:
* object_program(object(is|implements foo)) */ node *nn;
-
struct pike_
string
*new_type = NULL;
+
struct pike_
type
*new_type = NULL;
if (!n->type) {
-
copy_
shared_string
(n->type, program_type_string);
+
copy_
type
(n->type, program_type_string);
} if (!(nn = CDR(n))) return NULL; if ((nn->token == F_ARG_LIST) && (!(nn = CAR(nn)))) return NULL;
5651:
*/ PMOD_EXPORT void f__typeof(INT32 args) {
-
struct pike_string *
s
;
+
struct pike_string *
t
;
if(!args) SIMPLE_TOO_FEW_ARGS_ERROR("_typeof", 1);
-
s
= get_type_of_svalue(Pike_sp-args);
+
t
= get_type_of_svalue(Pike_sp-args);
pop_n_elems(args);
-
push_
string
(
s
);
-
Pike_sp[-1].type = T_TYPE;
+
push_
type_value
(
t
);
} /*! @decl void replace_master(object o)