From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Harig Newsgroups: gmane.lisp.guile.bugs Subject: Re: Can not work with libguile-2.0 Date: Thu, 17 Feb 2011 13:23:24 -0500 Message-ID: <8CD9CE6E0B29934-235C-1DA91@Webmail-m118.sysops.aol.com> References: <1e640654.925f.12e338022b5.Coremail.lispor@163.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1297967047 18098 80.91.229.12 (17 Feb 2011 18:24:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 17 Feb 2011 18:24:07 +0000 (UTC) To: lispor@163.com, bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Feb 17 19:24:03 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pq8WI-0006v3-LR for guile-bugs@m.gmane.org; Thu, 17 Feb 2011 19:24:02 +0100 Original-Received: from localhost ([127.0.0.1]:40341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pq8WI-0001Kv-73 for guile-bugs@m.gmane.org; Thu, 17 Feb 2011 13:24:02 -0500 Original-Received: from [140.186.70.92] (port=59489 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pq8WD-0001Km-09 for bug-guile@gnu.org; Thu, 17 Feb 2011 13:23:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pq8WB-0008QQ-QG for bug-guile@gnu.org; Thu, 17 Feb 2011 13:23:56 -0500 Original-Received: from imr-db03.mx.aol.com ([205.188.91.97]:41755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pq8WB-0008Q8-Nx for bug-guile@gnu.org; Thu, 17 Feb 2011 13:23:55 -0500 Original-Received: from imo-da03.mx.aol.com (imo-da03.mx.aol.com [205.188.169.201]) by imr-db03.mx.aol.com (8.14.1/8.14.1) with ESMTP id p1HINUsR025081; Thu, 17 Feb 2011 13:23:30 -0500 Original-Received: from idirectscm@aim.com by imo-da03.mx.aol.com (mail_out_v42.9.) id 7.eb3.f876399 (43907); Thu, 17 Feb 2011 13:23:25 -0500 (EST) Original-Received: from smtprly-dd03.mx.aol.com (smtprly-dd03.mx.aol.com [205.188.84.131]) by cia-dc07.mx.aol.com (v129.7) with ESMTP id MAILCIADC074-d4094d5d679c111; Thu, 17 Feb 2011 13:23:25 -0500 Original-Received: from Webmail-m118 (webmail-m118.sim.aol.com [64.12.224.208]) by smtprly-dd03.mx.aol.com (v129.8) with ESMTP id MAILSMTPRLYDD035-d4094d5d679c111; Thu, 17 Feb 2011 13:23:24 -0500 X-AOL-IP: 98.185.24.91 In-Reply-To: <1e640654.925f.12e338022b5.Coremail.lispor@163.com> X-MB-Message-Source: WebUI X-MB-Message-Type: User X-Mailer: AIM WebMail 33222-STANDARD Original-Received: from 98.185.24.91 by Webmail-m118.sysops.aol.com (64.12.224.208) with HTTP (WebMailUI); Thu, 17 Feb 2011 13:23:24 -0500 X-AOL-SENDER: idirectscm@aim.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 205.188.91.97 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5175 Archived-At: > And in section 2.4(Writing Guile Extensions) > There are some deprecated functions in the example Agreed. The example code uses deprecated functions. It would better if the developers of Guile were to provide some idiomatic code that shows the best practice that they recommend programmers use. Here is the C code in the reference manual: #include #include SCM j0_wrapper (SCM x) { return scm_make_real (j0 (scm_num2dbl (x, "j0"))); } void init_bessel () { scm_c_define_gsubr ("j0", 1, 0, 0, j0_wrapper); } scm_make_real and scm_num2dbl are included in deprecated.h: SCM_DEPRECATED SCM scm_make_real (double x); SCM_DEPRECATED double scm_num2dbl (SCM a, const char * why); The fact that these functions are marked as deprecated is saying that Guile recommends that they no longer be used, so it is contradictory for the manual to include them in example code. --