[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Module support: No environment in pointer release function

From: Elias Mårtenson
Subject: Module support: No environment in pointer release function
Date: Fri, 3 Feb 2017 10:55:57 +0800

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]