Skip to content
Snippets Groups Projects
Commit a253f4f5 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Now detects casting of builtin functions.

Fixes [bug 1373].

Rev: src/opcodes.c:1.104
parent fde244bb
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "bignum.h" #include "bignum.h"
#include "operators.h" #include "operators.h"
RCSID("$Id: opcodes.c,v 1.103 2001/03/04 19:27:18 mirar Exp $"); RCSID("$Id: opcodes.c,v 1.104 2001/03/31 15:36:03 grubba Exp $");
void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind) void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind)
{ {
...@@ -423,7 +423,11 @@ void o_cast(struct pike_type *type, INT32 run_time_type) ...@@ -423,7 +423,11 @@ void o_cast(struct pike_type *type, INT32 run_time_type)
return; return;
case T_FUNCTION: case T_FUNCTION:
if (Pike_sp[-1].subtype == FUNCTION_BUILTIN) {
Pike_error("Cannot cast builtin functions to object.\n");
} else {
sp[-1].type = T_OBJECT; sp[-1].type = T_OBJECT;
}
break; break;
default: default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment