pike.git/
src/
program.c
Branch:
Tag:
Non-build tags
All tags
No tags
2003-06-06
2003-06-06 14:31:11 by Henrik Grubbström (Grubba) <grubba@grubba.org>
ab901e6038d8de43f8e6de9cc0486f681ea03ba9 (
23
lines) (+
16
/-
7
)
[
Show
|
Annotate
]
Branch:
7.9
add_program_constant() now detects attempts to add the NULL program.
Rev: src/program.c:1.506
2:
|| This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: program.c,v 1.
505
2003/06/06
12
:
57
:
00
grubba Exp $
+
|| $Id: program.c,v 1.
506
2003/06/06
14
:
31
:
11
grubba Exp $
*/ #include "global.h"
-
RCSID("$Id: program.c,v 1.
505
2003/06/06
12
:
57
:
00
grubba Exp $");
+
RCSID("$Id: program.c,v 1.
506
2003/06/06
14
:
31
:
11
grubba Exp $");
#include "program.h" #include "object.h" #include "dynamic_buffer.h"
4251:
{ INT32 ret; struct svalue tmp;
+
if (p) {
tmp.type=T_PROGRAM; tmp.subtype=0; tmp.u.program=p;
-
+
} else {
+
/* Probable compilation error in a C-module. */
+
tmp.type = T_INT;
+
tmp.subtype = NUMBER_UNDEFINED;
+
tmp.u.integer = 0;
+
my_yyerror("Program constant \"%s\" is NULL.", name);
+
}
ret=simple_add_constant(name, &tmp, flags); return ret; }