From: "Elias Mårtenson" <lokedhs@gmail.com>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Module support: No environment in pointer release function
Date: Fri, 3 Feb 2017 10:55:57 +0800 [thread overview]
Message-ID: <CADtN0WJ-hXNkzrHqzQjXYQDRRsHH1pO1Ujnh=DnG=yoWGWp-3g@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 788 bytes --]
I'm currently building an Emacs module to provide access to GSSAPI. In it,
I have to use the make_user_ptr() function in a few places. When creating a
user_ptr, the function accepts a pointer to a function which will be called
when the object is GC'ed.
The problem is that the free function is only called with a single
argument; the pointer itself. In my case, the underlying GSSAPI function
that releases the object may return some diagnostics, and I would like to
be able to call the Elisp function ‘warn’ with a message describing what
happened.
I think that the callback should accept 3 arguments instead of 1. In
addition to the pointer itself, the ‘emacs_env’ pointer is needed. An
arbitrary ‘void *data’ pointer would be useful too.
Regards,
Elias
[-- Attachment #2: Type: text/html, Size: 883 bytes --]
next reply other threads:[~2017-02-03 2:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-03 2:55 Elias Mårtenson [this message]
2017-02-06 5:33 ` Module support: No environment in pointer release function Paul Eggert
2017-02-07 3:16 ` Elias Mårtenson
2017-02-07 6:41 ` Paul Eggert
2017-02-07 12:54 ` Philipp Stephani
2017-02-07 12:51 ` Philipp Stephani
2017-02-07 12:50 ` Philipp Stephani
2017-02-08 17:03 ` Andreas Politz
2017-02-10 5:21 ` Elias Mårtenson
2017-02-10 5:22 ` Elias Mårtenson
2017-02-10 9:27 ` Andreas Politz
2017-02-26 16:23 ` Philipp Stephani
2017-02-27 4:31 ` Elias Mårtenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADtN0WJ-hXNkzrHqzQjXYQDRRsHH1pO1Ujnh=DnG=yoWGWp-3g@mail.gmail.com' \
--to=lokedhs@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).