From a192d8ab0d604e765aaaff76fad64aeeeb1fa823 Mon Sep 17 00:00:00 2001
From: Martin Stjernholm <mast@lysator.liu.se>
Date: Wed, 15 Dec 1999 00:54:28 +0100
Subject: [PATCH] Return undefined for function prototypes.

Rev: src/object.c:1.91
---
 src/object.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/object.c b/src/object.c
index e1fe2fc36b..e8387dac08 100644
--- a/src/object.c
+++ b/src/object.c
@@ -5,7 +5,7 @@
 \*/
 /**/
 #include "global.h"
-RCSID("$Id: object.c,v 1.90 1999/11/16 17:26:41 grubba Exp $");
+RCSID("$Id: object.c,v 1.91 1999/12/14 23:54:28 mast Exp $");
 #include "object.h"
 #include "dynamic_buffer.h"
 #include "interpret.h"
@@ -604,9 +604,15 @@ void low_object_index_no_free(struct svalue *to,
 
   switch(i->identifier_flags & (IDENTIFIER_FUNCTION | IDENTIFIER_CONSTANT))
   {
+  case IDENTIFIER_PIKE_FUNCTION:
+    if (i->func.offset == -1) {	/* prototype */
+      to->type=T_INT;
+      to->subtype=NUMBER_UNDEFINED;
+      to->u.integer=0;
+      break;
+    }
   case IDENTIFIER_FUNCTION:
   case IDENTIFIER_C_FUNCTION:
-  case IDENTIFIER_PIKE_FUNCTION:
     to->type=T_FUNCTION;
     to->subtype=f;
     to->u.object=o;
-- 
GitLab