Mercurial > hg > xemacs-beta
diff src/eval.c @ 970:0dc7756a58c4
[xemacs-hg @ 2002-08-22 11:31:39 by stephent]
fix GCPRO in do_autoload <871y8rnndk.fsf@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Thu, 22 Aug 2002 11:31:43 +0000 |
parents | 0391335b65dc |
children | 184461bc8de4 |
line wrap: on
line diff
--- a/src/eval.c Thu Aug 22 11:19:58 2002 +0000 +++ b/src/eval.c Thu Aug 22 11:31:43 2002 +0000 @@ -1403,6 +1403,7 @@ if (EQ (tem, Qt) || EQ (tem, Qmacro)) { /* Yes, load it and try again. */ + /* do_autoload GCPROs both arguments */ do_autoload (def, sym); continue; } @@ -3036,7 +3037,10 @@ { final = indirect_function (cmd, 1); if (CONSP (final) && EQ (Fcar (final), Qautoload)) - do_autoload (final, cmd); + { + /* do_autoload GCPROs both arguments */ + do_autoload (final, cmd); + } else break; } @@ -3212,6 +3216,7 @@ return Qnil; } +/* do_autoload GCPROs both arguments */ void do_autoload (Lisp_Object fundef, Lisp_Object funname) @@ -3219,10 +3224,10 @@ /* This function can GC */ int speccount = specpdl_depth(); Lisp_Object fun = funname; - struct gcpro gcpro1, gcpro2; + struct gcpro gcpro1, gcpro2, gcpro3; CHECK_SYMBOL (funname); - GCPRO2 (fun, funname); + GCPRO3 (fundef, funname, fun); /* Value saved here is to be restored into Vautoload_queue */ record_unwind_protect (un_autoload, Vautoload_queue); @@ -3610,6 +3615,7 @@ if (EQ (funcar, Qautoload)) { + /* do_autoload GCPROs both arguments */ do_autoload (fun, original_fun); goto retry; } @@ -3802,6 +3808,7 @@ } else if (EQ (funcar, Qautoload)) { + /* do_autoload GCPROs both arguments */ do_autoload (fun, args[0]); goto retry; } @@ -3892,11 +3899,8 @@ } else if (EQ (funcar, Qautoload)) { - struct gcpro gcpro1; - - GCPRO1 (function); + /* do_autoload GCPROs both arguments */ do_autoload (function, orig_function); - UNGCPRO; function = orig_function; goto retry; }