aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorStefan Monnier2011-03-30 14:04:11 -0400
committerStefan Monnier2011-03-30 14:04:11 -0400
commit1c470562971bd86b1767ceb9ae95ece71228549f (patch)
tree995ae6f1b4f185181fa2b3ffe58bcae7dbbf54cc /src/bytecode.c
parenta5954fa5c84101c99857ea65196ef9050138119f (diff)
downloademacs-1c470562971bd86b1767ceb9ae95ece71228549f.tar.gz
emacs-1c470562971bd86b1767ceb9ae95ece71228549f.zip
* src/bytecode.c (Fbyte_code): CAR and CDR can GC.
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index ce2f06dfccb..a7be8e26f27 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -554,7 +554,16 @@ If the third argument is incorrect, Emacs may crash. */)
554 { 554 {
555 Lisp_Object v1; 555 Lisp_Object v1;
556 v1 = TOP; 556 v1 = TOP;
557 TOP = CAR (v1); 557 if (CONSP (v1))
558 TOP = XCAR (v1);
559 else if (NILP (v1))
560 TOP = Qnil;
561 else
562 {
563 BEFORE_POTENTIAL_GC ();
564 wrong_type_argument (Qlistp, v1);
565 AFTER_POTENTIAL_GC ();
566 }
558 break; 567 break;
559 } 568 }
560 569
@@ -580,7 +589,17 @@ If the third argument is incorrect, Emacs may crash. */)
580 { 589 {
581 Lisp_Object v1; 590 Lisp_Object v1;
582 v1 = TOP; 591 v1 = TOP;
583 TOP = CDR (v1); 592 if (CONSP (v1))
593 TOP = XCDR (v1);
594 else if (NILP (v1))
595 TOP = Qnil;
596 else
597 {
598 BEFORE_POTENTIAL_GC ();
599 wrong_type_argument (Qlistp, v1);
600 AFTER_POTENTIAL_GC ();
601 }
602 break;
584 break; 603 break;
585 } 604 }
586 605
@@ -911,13 +930,13 @@ If the third argument is incorrect, Emacs may crash. */)
911 v1 = POP; 930 v1 = POP;
912 v2 = TOP; 931 v2 = TOP;
913 CHECK_NUMBER (v2); 932 CHECK_NUMBER (v2);
914 AFTER_POTENTIAL_GC ();
915 op = XINT (v2); 933 op = XINT (v2);
916 immediate_quit = 1; 934 immediate_quit = 1;
917 while (--op >= 0 && CONSP (v1)) 935 while (--op >= 0 && CONSP (v1))
918 v1 = XCDR (v1); 936 v1 = XCDR (v1);
919 immediate_quit = 0; 937 immediate_quit = 0;
920 TOP = CAR (v1); 938 TOP = CAR (v1);
939 AFTER_POTENTIAL_GC ();
921 break; 940 break;
922 } 941 }
923 942