From ef884f239fea782ea5888d567b3c13c0b87ed5ea Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Fri, 29 Jun 2012 05:35:32 +0400 Subject: [PATCH] * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be undefined. Convert from xassert to eassert. * nsmenu.m: Convert from xassert to eassert. * nsterm.m: Likewise. --- src/ChangeLog | 7 +++++++ src/nsfns.m | 10 +++++----- src/nsmenu.m | 2 +- src/nsterm.m | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 241658ac33a..b7a1da9cd57 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2012-06-29 Dmitry Antipov + + * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be + undefined. Convert from xassert to eassert. + * nsmenu.m: Convert from xassert to eassert. + * nsterm.m: Likewise. + 2012-06-28 Stefan Monnier * editfns.c (region_limit): Clip to narrowing (bug#11770). diff --git a/src/nsfns.m b/src/nsfns.m index 113fff394c4..cd943ac4bab 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -101,7 +101,7 @@ extern BOOL ns_in_resize; static Lisp_Object as_script, *as_result; static int as_status; -#if GLYPH_DEBUG +#ifdef GLYPH_DEBUG static ptrdiff_t image_cache_refcount; #endif @@ -1058,16 +1058,16 @@ unwind_create_frame (Lisp_Object frame) /* If frame is ``official'', nothing to do. */ if (NILP (Fmemq (frame, Vframe_list))) { -#if GLYPH_DEBUG && XASSERTS +#if defined GLYPH_DEBUG && defined ENABLE_CHECKING struct ns_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); #endif x_free_frame_resources (f); free_glyphs (f); -#if GLYPH_DEBUG +#ifdef GLYPH_DEBUG /* Check that reference counts are indeed correct. */ - xassert (dpyinfo->terminal->image_cache->refcount == image_cache_refcount); + eassert (dpyinfo->terminal->image_cache->refcount == image_cache_refcount); #endif return Qt; } @@ -1294,7 +1294,7 @@ This function is an internal primitive--use `make-frame' instead. */) x_default_parameter (f, parms, Qright_fringe, Qnil, "rightFringe", "RightFringe", RES_TYPE_NUMBER); -#if GLYPH_DEBUG +#ifdef GLYPH_DEBUG image_cache_refcount = FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0; #endif diff --git a/src/nsmenu.m b/src/nsmenu.m index 1f86417b53a..9d74337580a 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -1057,7 +1057,7 @@ update_frame_tool_bar (FRAME_PTR f) { /* NS toolbar auto-computes disabled and selected images */ idx = TOOL_BAR_IMAGE_ENABLED_SELECTED; - xassert (ASIZE (image) >= idx); + eassert (ASIZE (image) >= idx); image = AREF (image, idx); } else diff --git a/src/nsterm.m b/src/nsterm.m index bf14e5c83b1..c75b17135ef 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2108,7 +2108,7 @@ ns_after_update_window_line (struct glyph_row *desired_row) NSTRACE (ns_after_update_window_line); /* begin copy from other terms */ - xassert (w); + eassert (w); if (!desired_row->mode_line_p && !w->pseudo_window_p) desired_row->redraw_fringe_bitmaps_p = 1; -- 2.39.2