From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Aur=C3=A9lien_Aptel?= Newsgroups: gmane.emacs.devel Subject: Re: Dynamic loading progress Date: Sat, 26 Sep 2015 16:56:59 +0200 Message-ID: References: <55DE75FD.8020308@cs.ucla.edu> <55F5DD8C.70506@dancol.org> <55F62C16.4000105@dancol.org> <55F64F04.9030002@dancol.org> <55F6E43E.9030502@dancol.org> <55F70C4E.8030805@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1443279445 15996 80.91.229.3 (26 Sep 2015 14:57:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Sep 2015 14:57:25 +0000 (UTC) Cc: Daniel Colascione , Emacs development discussions , Philipp Stephani , Paul Eggert , Tom Tromey , Stephen Leake To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 26 16:57:16 2015 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 1ZfquZ-0006aB-Bx for ged-emacs-devel@m.gmane.org; Sat, 26 Sep 2015 16:57:15 +0200 Original-Received: from localhost ([::1]:54080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfquY-0002bM-Nv for ged-emacs-devel@m.gmane.org; Sat, 26 Sep 2015 10:57:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfquL-0002bE-2O for emacs-devel@gnu.org; Sat, 26 Sep 2015 10:57:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfquK-00067M-9A for emacs-devel@gnu.org; Sat, 26 Sep 2015 10:57:00 -0400 Original-Received: from mail-io0-x233.google.com ([2607:f8b0:4001:c06::233]:34271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfquK-000671-4c for emacs-devel@gnu.org; Sat, 26 Sep 2015 10:57:00 -0400 Original-Received: by iofb144 with SMTP id b144so137870820iof.1 for ; Sat, 26 Sep 2015 07:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=J3EyJX8LEJXhUPAAK+UYoQ3UWNNsK6XusW9/F3EJCDI=; b=urFAEBrndojBU+L31hUob1uSCl2dxSry2TIL3dGQRIjr8wlogsoVTsjqEr5jktUdef ujCk4ns6nfhdrX3t0+zvWe9ypaZca+FQ9H/4VvNNuxofloJ2pfl8AvLHVXSCgm9ZJRBr 139+MmlApH+yw1WOLprf22eosx1/4pPpsJIPPX6I0kzjjrc+vIU5tb0tH7JFWUG2Fz7b UI4owwt9vbsvYO6HG2XKEHJEkhDzqMdikEfeAICl0VIPG1mshSM9Wz8VrC3I5GmmbW8I 2sHT0fSmiPNnMViT9YHsAvHWu9QE59uhAhTYUxi5pY3aK7bWCA4aH3dMqpsc4xgH1Vgu //9w== X-Received: by 10.107.136.88 with SMTP id k85mr10633002iod.135.1443279419325; Sat, 26 Sep 2015 07:56:59 -0700 (PDT) Original-Received: by 10.36.146.193 with HTTP; Sat, 26 Sep 2015 07:56:59 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: vIzolDbh7igF61_a7FBCpBuYiEs X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c06::233 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:190360 Archived-At: I've implemented signal() and I've made the module support configurable (disabled by default). Except for signal() all error related functions are unimplemented (they are not useful because funcall() doesn't return to module code on error right now). I've also added a signal test. The make_string() now takes the length of the string as a parameter. Right now module are loaded with `module-load'. I need to modify `load' so that it also looks for modules (which will make `require' work). How should module docstring be written? We either: * pick a new syntax and teach make-docfile how to parse it. This is the clean approach IMO, but it requires more work. We can use a sufficiently simple syntax so that it can be embedded in comments in other languages than C. * define DEFVAR/DEFUN macro in module API header file to a noop so that make-docfile can parse it as it is. As for the finalizer, I wanted to add a function in the API: /* Finalizer prototype */ typedef int (*emacs_finalizer_function)(void *ptr); emacs_value make_user_ptr (emacs_env *env, void *ptr, emacs_finalizer_function *fin); Or we can have a full "method table" with printer function and other things we might need in the future. Although It's a bit overkill with just finalizer/printer... /* Printer prototype */ typedef emacs_value (*emacs_printer_function)(void *ptr); /* User-ptr operations */ typedef struct { emacs_finalizer_function *fin; emacs_printer_function *print; /* ... */ } emacs_user_ptr_ops; emacs_value make_user_ptr (emacs_env *env, void *ptr, emacs_user_ptr_ops *ops);