emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add user content APIs for WebKit Xwidgets


From: Po Lu
Subject: Re: [PATCH] Add user content APIs for WebKit Xwidgets
Date: Sun, 16 Oct 2022 08:26:27 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Qiantan Hong <qthong@stanford.edu> writes:

> I see similar intern usage for "xwidget-internal”, "download-callback”
> and "javascript-callback” in xwidget.c. I was trying to be consistent.
> If I’m changing to Qscript_message should those be changed too?

Sure.

> name is used as a symbol/identifier in a namespace in JavaScript. 
> It is used in the form of “messageHandlers.name”. Therefore I wanted
> to map it to something conceptually similar in Lisp, i.e. a Lisp symbol.
> That way we get efficient comparison and EQ lookup (useful for identifiers!)
> by sacrificing string-manipulating operations (not that often for 
> identifiers!).
> For example, I need to lookup a handler in an ALIST for every script-message.
> Does that make sense?

assoc is fast unless you have lots of handlers, in which case I'd be
more worried about using an alist.

Anyway, you proceed to copy the symbol name into a string and intern it
later.  That is not correct, since the symbol given may be uninterned.


reply via email to

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