【发布时间】:2011-02-25 15:05:49
【问题描述】:
在 Clozure Common Lisp 1.6 上使用 (ql:quickload "cffi") 成功加载 CFFI 后,我在 *features* 中有 CFFI-FEATURES:X86 CFFI-FEATURES:UNIX :CFFI。但是我很好奇为什么 CFFI 的某些功能在 cffi-sys: 前缀下可见:
? (documentation 'cffi:null-pointer 'function)
"Construct and return a null pointer."
? (documentation 'cffi-sys:%foreign-funcall 'function)
"Perform a foreign function call, document it more later."
而其他一些人也可以使用cffi::
? (documentation 'cffi:null-pointer 'function)
"Construct and return a null pointer."
? (documentation 'cffi:%foreign-funcall 'function)
> Error: Reader error: No external symbol named "%FOREIGN-FUNCALL" in package #<Package "CFFI">.
> While executing: CCL::%PARSE-TOKEN, in process listener(1).
> Type :GO to continue, :POP to abort, :R for a list of available restarts.
> If continued: Use the internal symbol CFFI-SYS:%FOREIGN-FUNCALL
> Type :? for other options.
查看cffi_0.10.6/src/cffi-openmcl.lisp 我可以看到(defpackage #:cffi-sys ...,那么cffi:null-pointer 是如何工作的?
【问题讨论】:
标签: common-lisp