From 17fdb2228b820dc577ff61b03876117eba5226d1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 27 Sep 2011 09:02:05 -0700 Subject: [PATCH] * nsselect.m (clean_local_selection_data): Use ptrdiff_t, not int. --- src/ChangeLog | 2 +- src/nsselect.m | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 52514d36429..99d645c0568 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -528,7 +528,7 @@ Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts. (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is wide enough. - * nsselect.m (ns_get_local_selection): + * nsselect.m (ns_get_local_selection, clean_local_selection_data): Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts. * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte) (PRINTDECLARE, PRINTPREPARE): diff --git a/src/nsselect.m b/src/nsselect.m index 655fedc640c..9f6f35968f5 100644 --- a/src/nsselect.m +++ b/src/nsselect.m @@ -109,8 +109,8 @@ clean_local_selection_data (Lisp_Object obj) if (VECTORP (obj)) { - int i; - int size = ASIZE (obj); + ptrdiff_t i; + ptrdiff_t size = ASIZE (obj); Lisp_Object copy; if (size == 1) @@ -353,7 +353,7 @@ ns_string_from_pasteboard (id pb) length = [mstr lengthOfBytesUsingEncoding: NSUTF8StringEncoding]; #if ! defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4 - if (!utfStr) + if (!utfStr) { utfStr = [mstr cString]; length = strlen (utfStr); @@ -621,4 +621,3 @@ The functions are called with one argument, the selection type\n\ Qforeign_selection = intern_c_string ("foreign-selection"); staticpro (&Qforeign_selection); } - -- 2.39.2