pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.c:11464:
} PMOD_EXPORT struct program *program_from_function(const struct svalue *f) { if(TYPEOF(*f) != T_FUNCTION) return 0; if(SUBTYPEOF(*f) == FUNCTION_BUILTIN) return 0; return low_program_from_function(f->u.object, SUBTYPEOF(*f)); }
-
static const struct pike_type *is_subtyped_object_type(struct pike_type *t)
-
{
-
if ((t->type == T_OBJECT) && t->cdr) return t;
-
return NULL;
-
}
-
+
PMOD_EXPORT struct program *program_from_type(const struct pike_type *t) {
-
t = find_
type(t, is_subtyped_
object_type);
+
t = find_
object_
type(t);
if (!t) return NULL; return id_to_program((int)(ptrdiff_t)t->cdr); } /* NOTE: Does not add references to the return value! */ PMOD_EXPORT struct program *low_program_from_svalue(const struct svalue *s, struct object **parent_obj, int *parent_id) { switch(TYPEOF(*s))