From e5815a227dacbec09b5c5be4b2993448e3b2e39f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Tue, 3 Mar 1998 15:40:37 -0800 Subject: [PATCH] bugfix Rev: src/modules/Image/encodings/pnm.c:1.7 Rev: src/modules/Yp/yp.c:1.10 Rev: src/pike_memory.c:1.8 Rev: src/stralloc.c:1.21 --- src/modules/Image/encodings/pnm.c | 8 ++++---- src/modules/Yp/yp.c | 2 +- src/pike_memory.c | 6 +++--- src/stralloc.c | 5 +++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/modules/Image/encodings/pnm.c b/src/modules/Image/encodings/pnm.c index 844f39ca8c..de8863fb14 100644 --- a/src/modules/Image/encodings/pnm.c +++ b/src/modules/Image/encodings/pnm.c @@ -1,9 +1,9 @@ -/* $Id: pnm.c,v 1.6 1998/03/03 22:30:29 hubbe Exp $ */ +/* $Id: pnm.c,v 1.7 1998/03/03 23:30:17 hubbe Exp $ */ /* **! module Image **! note -**! $Id: pnm.c,v 1.6 1998/03/03 22:30:29 hubbe Exp $ +**! $Id: pnm.c,v 1.7 1998/03/03 23:30:17 hubbe Exp $ **! submodule PNM **! **! This submodule keeps the PNM encode/decode capabilities @@ -49,7 +49,7 @@ #include "stralloc.h" #include "global.h" -RCSID("$Id: pnm.c,v 1.6 1998/03/03 22:30:29 hubbe Exp $"); +RCSID("$Id: pnm.c,v 1.7 1998/03/03 23:30:17 hubbe Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -321,7 +321,7 @@ void init_image_pnm(void) image_pnm_module_program=end_program(); push_object(clone_object(image_pnm_module_program,0)); add_constant(s=make_shared_string("PNM"),sp-1,0); - free_sstring(s); + free_string(s); pop_stack(); } diff --git a/src/modules/Yp/yp.c b/src/modules/Yp/yp.c index 163afc9212..0f98635087 100644 --- a/src/modules/Yp/yp.c +++ b/src/modules/Yp/yp.c @@ -216,7 +216,7 @@ void pike_module_init(void) add_function("map", f_map, "function(string,function|array(function):void)", 0); add_function("order", f_order, "function(string:int)", 0); - add_program_constant("Domain", end_program(), 0); + end_class("Domain",0); } void pike_module_exit(void) diff --git a/src/pike_memory.c b/src/pike_memory.c index 24704b5b5a..d4c6f632e0 100644 --- a/src/pike_memory.c +++ b/src/pike_memory.c @@ -858,11 +858,11 @@ void cleanup_memhdrs(void) mt_destroy(&debug_malloc_mutex); } -int main(int argc, char *argv[]) +int main(int argc, char *argv[], char **env) { - extern int dbm_main(int, char **); + extern int dbm_main(int, char **, char**); mt_init(&debug_malloc_mutex); - return dbm_main(argc, argv); + return dbm_main(argc, argv, env); } void * debug_malloc_update_location(void *p,const char *fn, int line) diff --git a/src/stralloc.c b/src/stralloc.c index 3e425fd6ad..7ed337b3cd 100644 --- a/src/stralloc.c +++ b/src/stralloc.c @@ -623,6 +623,9 @@ void cleanup_shared_string_table(void) unsigned INT32 e; struct pike_string *s,*next; + if(!base_table) return; + + #if defined(DEBUG) && defined(DEBUG_MALLOC) if(verbose_debug_exit) { @@ -636,8 +639,6 @@ void cleanup_shared_string_table(void) } #endif - if(!base_table) return; - for(e=0;e<htable_size;e++) { for(s=base_table[e];s;s=next) -- GitLab