diff --git a/src/program.c b/src/program.c index 177f74e7c13874df9fbe215b8c75d98a47b50084..a4746e9f60994c39f259600c682c2240018f9aed 100644 --- a/src/program.c +++ b/src/program.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: program.c,v 1.204 2000/02/15 22:06:21 hubbe Exp $"); +RCSID("$Id: program.c,v 1.205 2000/02/15 23:39:33 grubba Exp $"); #include "program.h" #include "object.h" #include "dynamic_buffer.h" @@ -2528,6 +2528,22 @@ int really_low_find_shared_string_identifier(struct pike_string *name, return -1; } +int low_find_lfun(struct program *p, int lfun) +{ + struct pike_string *tmp = find_string(lfun_names[lfun]); + unsigned int flags = 0; + if (!tmp) return -1; + if ((1 <= lfun) && (lfun < 3)) { + /* create() and destroy() are used even if they are static. */ + flags = SEE_STATIC; + } + return + really_low_find_shared_string_identifier(lfun_name, + dmalloc_touch(struct program *, + p), + flags); +} + /* * lookup the number of a function in a program given the name in * a shared_string