pike.git/
src/
program.c
Branch:
Tag:
Non-build tags
All tags
No tags
1997-02-11
1997-02-11 07:20:15 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
c15240cef103144d2d60a5457ac0bbc610d9c715 (
18
lines) (+
17
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
add_function_constant added
Rev: src/program.c:1.20
Rev: src/program.h:1.12
4:
||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h"
-
RCSID("$Id: program.c,v 1.
19
1997/02/
07
01
:
34
:
19
hubbe Exp $");
+
RCSID("$Id: program.c,v 1.
20
1997/02/
11
07:
20
:
15
hubbe Exp $");
#include "program.h" #include "object.h" #include "dynamic_buffer.h"
1066:
return ret; }
+
int add_function_constant(char *name, void (*cfun)(INT32), char * type, INT16 flags)
+
{
+
struct svalue s;
+
struct pike_string *n;
+
INT32 ret;
+
+
s.type=T_FUNCTION;
+
s.subtype=FUNCTION_BUILTIN;
+
s.u.efun=make_callable(cfun, name, type, flags, 0, 0);
+
ret=simple_add_constant(name, &s, 0);
+
free_svalue(&s);
+
return ret;
+
}
+
+
int end_class(char *name, INT32 flags) { INT32 ret;