]> git.eshelyaron.com Git - emacs.git/commitdiff
imrpve macros
authorAndrea Corallo <andrea_corallo@yahoo.it>
Sat, 22 Jun 2019 15:12:35 +0000 (17:12 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:33:43 +0000 (11:33 +0100)
src/comp.c

index 201ffa655978b4ea94943b103ae5cfa83c836066..c724f46a9b38807554e3e77997266cb8abc5e75f 100644 (file)
@@ -125,15 +125,17 @@ along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 /* Pop from the meta-stack, emit the call and push the result */
 
 #define EMIT_CALL_N(name, nargs)                                       \
-  POP##nargs;                                                          \
-  res = emit_call (name, comp.lisp_obj_type, nargs, args);             \
-  PUSH_RVAL (res);
+  do {                                                                 \
+    POP##nargs;                                                                \
+    res = emit_call (name, comp.lisp_obj_type, nargs, args);           \
+    PUSH_RVAL (res);                                                   \
+  } while (0)
 
 /* Generate appropriate case and emit call to function. */
 
 #define CASE_CALL_NARGS(name, nargs)                                   \
   case B##name:                                                                \
-  EMIT_CALL_N (STR(F##name), nargs)                                    \
+  EMIT_CALL_N (STR(F##name), nargs);                                   \
   break
 
 /* Emit calls to functions with prototype (ptrdiff_t nargs, Lisp_Object *args)