From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Move sha1 to C? Date: Mon, 23 May 2011 03:21:19 -0400 Message-ID: References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1306135288 5785 80.91.229.12 (23 May 2011 07:21:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 23 May 2011 07:21:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Leo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 23 09:21:25 2011 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 1QOPS8-0004jZ-4J for ged-emacs-devel@m.gmane.org; Mon, 23 May 2011 09:21:24 +0200 Original-Received: from localhost ([::1]:42708 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOPS7-0006IM-LE for ged-emacs-devel@m.gmane.org; Mon, 23 May 2011 03:21:23 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:57366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOPS4-0006IF-FP for emacs-devel@gnu.org; Mon, 23 May 2011 03:21:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOPS3-0002H5-Ku for emacs-devel@gnu.org; Mon, 23 May 2011 03:21:20 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:32884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOPS3-0002H1-Gi for emacs-devel@gnu.org; Mon, 23 May 2011 03:21:19 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QOPS3-0000UM-C6; Mon, 23 May 2011 03:21:19 -0400 In-reply-to: (message from Leo on Mon, 23 May 2011 04:02:04 +0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 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:139636 Archived-At: > From: Leo > Date: Mon, 23 May 2011 04:02:04 +0800 > > 1. add sha1.[ch] from gnulib Note that gnulib's sha1.c uses malloc, which is not safe in Emacs. So either make sure sha1_stream is never ever called by Emacs, or use xmalloc instead. > Should the signature of sha1 stay as is or change to be similar to md5? > > (md5 OBJECT &optional START END CODING-SYSTEM NOERROR) Are there any real reasons not to keep the API? If there are good reasons, let's hear them. If there are no good reasons, my vote is to keep the API backward-compatible.