From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Linas Vepstas Newsgroups: gmane.lisp.guile.user,gmane.lisp.guile.devel Subject: Re: Killing off scm_init_guile for Guile 2.0 ? Date: Fri, 16 Jan 2009 19:36:33 -0600 Message-ID: <3ae3aa420901161736u5de528d5gc75da062fb036115@mail.gmail.com> References: <49dd78620901151530o66a2641ax47e526d15fc09faf@mail.gmail.com> <20090116213215.YITDV.179685.root@cdptpa-web09-z02> Reply-To: linasvepstas@gmail.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1232156603 29622 80.91.229.12 (17 Jan 2009 01:43:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Jan 2009 01:43:23 +0000 (UTC) Cc: Guile User , guile-devel , Neil Jerram To: dsmich@roadrunner.com Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Jan 17 02:44:35 2009 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LO0Ek-0007m1-Hx for guile-user@m.gmane.org; Sat, 17 Jan 2009 02:44:34 +0100 Original-Received: from localhost ([127.0.0.1]:57991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LO0DT-0007Sr-J3 for guile-user@m.gmane.org; Fri, 16 Jan 2009 20:43:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LO0DN-0007RL-Pa for guile-user@gnu.org; Fri, 16 Jan 2009 20:43:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LO0DN-0007Qm-1B for guile-user@gnu.org; Fri, 16 Jan 2009 20:43:09 -0500 Original-Received: from [199.232.76.173] (port=49213 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LO0DM-0007Qg-Ti for guile-user@gnu.org; Fri, 16 Jan 2009 20:43:08 -0500 Original-Received: from yx-out-1718.google.com ([74.125.44.152]:1066) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LO0DM-00083m-Jo for guile-user@gnu.org; Fri, 16 Jan 2009 20:43:08 -0500 Original-Received: by yx-out-1718.google.com with SMTP id 34so812113yxf.66 for ; Fri, 16 Jan 2009 17:43:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=vjeDyNQ/s6p7cfVchT6H229HhoVs7+htQqGG2nw/fP0=; b=eUOaTX7b8atawPgsdnnV22Afj9y2IYDRWTgUUGDk24z62f2424WwlnjJwZuYl0GEFR MIwgCJYzuoCg/Uuqa5NzKA6NcX+v+1ifVRi3HqAUv3Y4Di2YfN+QPHPMB/EypO0tmeys 1lyQqOOEJBX4U/7pN/izFxpUYO8RgFJd4cjgk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; b=ZBLt5TGJGM3o/xes5dgybrBuHPf4Ci5Cq+joKt2Fb1AKkInI3TmGwyDC4h3aRLeK8Y z1CJoZTKTW5uEiKuuENn6tbtl10Ld0UHEpwqbVAuIWgtpS1LIzoqgUBj8QyeoEjT87dD +y38WbURXCjZqOnUKtH4Q6miTMCJ9d8YqXQpk= Original-Received: by 10.100.3.13 with SMTP id 13mr369277anc.74.1232156193719; Fri, 16 Jan 2009 17:36:33 -0800 (PST) In-Reply-To: <20090116213215.YITDV.179685.root@cdptpa-web09-z02> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:7065 gmane.lisp.guile.devel:8046 Archived-At: 2009/1/16 : > ---- Neil Jerram wrote: >> scm_init_guile has always been a bit problematic, as it requires lots >> of heuristic and OS-dependent code to try to determine where the base >> of the stack is. It's never been formally deprecated, but we have >> always advised people to use scm_boot_guile or scm_with_guile if they > Iirc, scm_init_guile is mainly used when you do not have access to main(), for example writing a module for apache. Generally, when you want to add Guile to an already existing application that has plugins or extension modules via .so's. This is an excellent example of where scm_init_guile is exactly the *wrong* function to use. The problem is, of course, that if you scm_init_guile in some .so, you will accidentally place the entire system into guile mode, and not just the .so, as intended. Instead, you want to call scm_with_guile on entry to the so, it will unwind on exit. This could be cleared up by having the docs make the case more forcefully. --linas