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: Lisp object that refers to a C struct Date: Mon, 15 Oct 2012 23:24:59 +0200 Message-ID: <83ehkz4edw.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1350336296 21583 80.91.229.3 (15 Oct 2012 21:24:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Oct 2012 21:24:56 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 15 23:25:03 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TNs9m-0007tm-Li for ged-emacs-devel@m.gmane.org; Mon, 15 Oct 2012 23:25:02 +0200 Original-Received: from localhost ([::1]:33870 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNs9f-00047v-QJ for ged-emacs-devel@m.gmane.org; Mon, 15 Oct 2012 17:24:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNs9d-000468-CE for emacs-devel@gnu.org; Mon, 15 Oct 2012 17:24:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNs9c-0000Uk-0g for emacs-devel@gnu.org; Mon, 15 Oct 2012 17:24:53 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:41794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNs9b-0000UO-Oh for emacs-devel@gnu.org; Mon, 15 Oct 2012 17:24:51 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MBY00300E2FRH00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Mon, 15 Oct 2012 23:24:49 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MBY003SBE5DQZ10@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Mon, 15 Oct 2012 23:24:49 +0200 (IST) X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.172 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:154360 Archived-At: What is the recommended method of getting a Lisp object that represents a C struct? It seems like a pseudo-vector is used for this, but in my case it looks like an overkill: my struct has no Lisp members. All I need is a Lisp object that will serve as descriptor for the struct, and that can be used to extract a pointer to the struct, for C code to access that struct. There's Lisp_Save_Value, which looks very promising, but why does its documentation say it's for record_unwind_protect? Is there anything in it which would preclude its use outside unwinding?