开发者

Generate code in C

开发者 https://www.devze.com 2023-04-05 06:14 出处:网络
I\'ve got a library in C that I\'d like to generate bindings for in Elisp. In Ruby, I\'d simply include a header and then use its C API to generate functions and so on. Can I do the same on elisp? des

I've got a library in C that I'd like to generate bindings for in Elisp. In Ruby, I'd simply include a header and then use its C API to generate functions and so on. Can I do the same on elisp? describe-function often says that a function is in "C source code". How are these generated?

Thank开发者_StackOverflow中文版s!


You can check this Emacs doc to see how to wrap C function into a DEFUN macro to make it accessible from Emacs.

Once primitives are defined you need to recompile Emacs, you cannot load them dynamically in the runtime.

0

精彩评论

暂无评论...
验证码 换一张
取 消