diff --git a/src/mapping.c b/src/mapping.c index 9116bc609e986eb8f7de64654505fe9564ac009f..5354320a64df995a26cdca51d5567efdff6d5a11 100644 --- a/src/mapping.c +++ b/src/mapping.c @@ -4,7 +4,7 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: mapping.c,v 1.29 1998/04/20 18:53:17 grubba Exp $"); +RCSID("$Id: mapping.c,v 1.30 1998/04/24 00:01:32 hubbe Exp $"); #include "main.h" #include "object.h" #include "mapping.h" @@ -495,6 +495,16 @@ struct svalue *low_mapping_string_lookup(struct mapping *m, return low_mapping_lookup(m, &tmp); } +void mapping_string_insert(struct mapping *m, + struct pike_string *p, + struct svalue *val) +{ + struct svalue tmp; + tmp.type=T_STRING; + tmp.u.string=p; + mapping_insert(m, &tmp, val); +} + struct svalue *simple_mapping_string_lookup(struct mapping *m, char *p) { diff --git a/src/mapping.h b/src/mapping.h index 13c0c0a51526b93e3d6439bb671d268669496774..cd6b222fc6080abb3b4bbb6f52a95c3c46edff7b 100644 --- a/src/mapping.h +++ b/src/mapping.h @@ -5,7 +5,7 @@ \*/ /* - * $Id: mapping.h,v 1.10 1998/03/28 15:12:50 grubba Exp $ + * $Id: mapping.h,v 1.11 1998/04/24 00:01:32 hubbe Exp $ */ #ifndef MAPPING_H #define MAPPING_H @@ -47,6 +47,9 @@ struct svalue *low_mapping_lookup(struct mapping *m, struct svalue *key); struct svalue *low_mapping_string_lookup(struct mapping *m, struct pike_string *p); +void mapping_string_insert(struct mapping *m, + struct pike_string *p, + struct svalue *val); struct svalue *simple_mapping_string_lookup(struct mapping *m, char *p); void mapping_index_no_free(struct svalue *dest,