1998-03-20
1998-03-20 03:40:50 by Per Hedbor <ph@opera.com>
-
1b7712c71e15f52fe0ce29169cded6b81333f374
(15 lines)
(+4/-11)
[
Show
| Annotate
]
Branch: 7.9
profiling info function ow uses svalue_to_program
Rev: src/builtin_functions.c:1.86
4:
||| See the files COPYING and DISCLAIMER for more information.
\*/
#include "global.h"
- RCSID("$Id: builtin_functions.c,v 1.85 1998/03/18 20:26:28 per Exp $");
+ RCSID("$Id: builtin_functions.c,v 1.86 1998/03/20 03:40:50 per Exp $");
#include "interpret.h"
#include "svalue.h"
#include "pike_macros.h"
2403: Inside #if defined(PROFILING)
if (!args) {
error("get_profiling_info(): Too few arguments\n");
}
- if (sp[-args].type == T_FUNCTION
- && sp[-args].subtype != FUNCTION_BUILTIN) {
- prog = sp[-args].u.object->prog;
- } else if (sp[-args].type == T_OBJECT) {
- prog = sp[-args].u.object->prog;
- } else if (sp[-args].type == T_PROGRAM) {
- prog = sp[-args].u.program;
- }
-
+ prog = program_from_svalue(sp-args);
if(!prog) error("get_profiling_info(): Bad argument 1\n");
prog->refs++;