From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: how to keep a copy of emacs_env or ert in module ? Date: Sun, 11 Sep 2016 08:41:58 +0200 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1473576233 9356 195.159.176.226 (11 Sep 2016 06:43:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Sep 2016 06:43:53 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: emacs-devel@gnu.org To: hx Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 11 08:43:49 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1biyUR-0001Jv-UZ for ged-emacs-devel@m.gmane.org; Sun, 11 Sep 2016 08:43:44 +0200 Original-Received: from localhost ([::1]:36729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biyUQ-0003j1-3z for ged-emacs-devel@m.gmane.org; Sun, 11 Sep 2016 02:43:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biyUJ-0003ip-Qi for emacs-devel@gnu.org; Sun, 11 Sep 2016 02:43:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biyUD-00044y-Su for emacs-devel@gnu.org; Sun, 11 Sep 2016 02:43:34 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.9]:46457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biyUD-0003eV-MU for emacs-devel@gnu.org; Sun, 11 Sep 2016 02:43:29 -0400 Original-Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3sX1ZL5SGvz3hjS9; Sun, 11 Sep 2016 08:42:02 +0200 (CEST) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3sX1ZL5CjvzvkXS; Sun, 11 Sep 2016 08:42:02 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id 72ZRlnLAzF4h; Sun, 11 Sep 2016 08:42:01 +0200 (CEST) X-Auth-Info: /+oLB5Pw7mBXJ8EPiXj8zzTOiam5sCpekRfl3QkNacffsUDMkiD3FSSx9xAND1gk Original-Received: from linux.local (ppp-88-217-19-108.dynamic.mnet-online.de [88.217.19.108]) by mail.mnet-online.de (Postfix) with ESMTPA; Sun, 11 Sep 2016 08:42:01 +0200 (CEST) Original-Received: by linux.local (Postfix, from userid 501) id E787E1E5642; Sun, 11 Sep 2016 08:41:59 +0200 (CEST) X-Yow: Am I accompanied by a PARENT or GUARDIAN? In-Reply-To: (hx's message of "Sun, 11 Sep 2016 12:28:49 +0800") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 212.18.0.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:207359 Archived-At: On Sep 11 2016, hx wrote: > int emacs_module_init(struct emacs_runtime *ert) { > emacs_env *env = ert->get_environment(ert); > gert = ert; > genv = env; > > return 0; > } // until here, the gert and genv content still correct. All the contents of ert disappears when the funtion returns. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."