emacs-devel
[Top][All Lists]
Advanced

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

Re: Modifying Emacs to use the Mac OS X Keychain Services


From: Chong Yidong
Subject: Re: Modifying Emacs to use the Mac OS X Keychain Services
Date: Fri, 17 Jun 2011 16:31:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> The Lisp_Misc_Save_Value holds a void pointer and an integer.  Just
>> provide convenience functions for yourself that take a
>> Lisp_Misc_Save_Value and set the pointer to the SecKeychainRef or
>> extract it back out.  Use the `SAVE_VALUEP' and `XSAVE_VALUE' macros.
>
> That only works if you know for sure that this save_value indeed holds
> a SecKeychainRef, which is only the case if Elisp can never get its hands
> on it.

I don't like the idea of having a first class Emacs Lisp object that's a
proprietary Mac OS specific pointer object.

If there is really no other way (such as an id number) to identify the
SecKeychainRef, I think it's better to do what image.c does: make the
Lisp representation the list specification used to generate the
SecKeychainRef, keep an internal hash table that stores the
SecKeychainRef that's never exposed to Lisp.  Then the Lisp-visible
functions would take the list spec as its argument and look up the
SecKeychainRefs in the table.



reply via email to

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