From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Viktor Pavlenko Newsgroups: gmane.lisp.guile.user Subject: Re: guile's eval from C Date: Mon, 30 Sep 2002 15:36:28 -0400 Sender: guile-user-admin@gnu.org Message-ID: <15768.42940.139655.658084@shmyh.ua> References: <15767.26838.537408.102758@shmyh.ua> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1033414658 21865 127.0.0.1 (30 Sep 2002 19:37:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 30 Sep 2002 19:37:38 +0000 (UTC) Cc: guile-user@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17w6MJ-0005gN-00 for ; Mon, 30 Sep 2002 21:37:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17w6MD-0005Ea-00; Mon, 30 Sep 2002 15:37:29 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17w6LM-0004q2-00 for guile-user@gnu.org; Mon, 30 Sep 2002 15:36:36 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17w6LG-0004nm-00 for guile-user@gnu.org; Mon, 30 Sep 2002 15:36:35 -0400 Original-Received: from [24.156.155.183] (helo=shmyh.ua) by monty-python.gnu.org with esmtp (Exim 4.10) id 17w6LF-0004na-00 for guile-user@gnu.org; Mon, 30 Sep 2002 15:36:29 -0400 Original-Received: by shmyh.ua (Postfix, from userid 502) id 2C02EE5EE; Mon, 30 Sep 2002 15:36:28 -0400 (EDT) Original-To: Neil Jerram In-Reply-To: X-Mailer: VM 7.07 under Emacs 21.2.1 Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:1098 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:1098 >>>>> "NJ" == Neil Jerram writes: >>>>> "Viktor" == Viktor Pavlenko writes: Viktor> Hello and sorry for the simple question. Viktor> I'd like to evaluate an SCM object from C, equivalent to guile> (eval '(car '("a" "b" "c"))) Viktor> "a" guile> (eval "a") Viktor> "a" Viktor> Looks like the best way is to call gh_call1(), but how do Viktor> I get an SCM object for guile's eval? I could also build a Viktor> C string containing the complete expression to be Viktor> evaluated ( "(eval '(car '("a" "b" "c")))" ) and call Viktor> gh_eval_str() but this seems inefficient because I have Viktor> the expression to be evaluated as SCM object. NJ> One possibility is: NJ> scm_primitive_eval (exp); NJ> This will evaluate the supplied expression in the current module. NJ> Does this help? I believe it will when I switch to 1.6. Thanks! Viktor _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user