From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: [xterm.h] note on 'dragging' field of 'struct scroll_bar' Date: Tue, 10 Jan 2012 17:58:01 +0400 Message-ID: <4F0C43E9.3060300@yandex.ru> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1326203852 24765 80.91.229.12 (10 Jan 2012 13:57:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 10 Jan 2012 13:57:32 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 10 14:57:28 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RkcCe-0005xS-CU for ged-emacs-devel@m.gmane.org; Tue, 10 Jan 2012 14:57:28 +0100 Original-Received: from localhost ([::1]:37263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkcCd-00066H-Sy for ged-emacs-devel@m.gmane.org; Tue, 10 Jan 2012 08:57:27 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:33003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkcCU-00066B-1Y for emacs-devel@gnu.org; Tue, 10 Jan 2012 08:57:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkcCO-00005I-E9 for emacs-devel@gnu.org; Tue, 10 Jan 2012 08:57:18 -0500 Original-Received: from mail.dev.rtsoft.ru ([213.79.90.226]:34588) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RkcCN-000051-Vf for emacs-devel@gnu.org; Tue, 10 Jan 2012 08:57:12 -0500 Original-Received: (qmail 4908 invoked from network); 10 Jan 2012 13:57:09 -0000 Original-Received: from unknown (HELO ?192.168.5.146?) (192.168.1.70) by 0 with SMTP; 10 Jan 2012 13:57:09 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 213.79.90.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:147568 Archived-At: I want to notice about the placement of 'dragging' field within 'struct scroll_bar'. It's a Lisp_Object, but placed so it's not reachable by the marking traversal. IIUC, it works just because it's always an integer, Qnil or Qt; but this is a potential trap for someone who will change this someday. So, I think it's better to use plain C 'int' instead, or move 'dragging' up to the head of 'struct scroll_bar' before 'x_window'. And, the more general question is: why not use the same 'struct scroll_bar' both for X and Win32 code? Dmitry