Package: cffi
Function foreign-symbol-pointer
Lambda Listforeign-symbol-pointer (name &key library) ArgumentsDetails The function foreign-symbol-pointer will return a foreign
pointer corresponding to the foreign symbol denoted by the string foreign-name. If a foreign symbol named foreign-name doesn't exist, nil is returned. ABI name manglings will be performed on foreign-name by foreign-symbol-pointer if necessary. (e.g. adding a leading underscore on darwin/ppc) library should name a foreign library as defined by define-foreign-library, :default (which is the default) or an instance of foreign-library as returned by load-foreign-library. Important note: do not keep these pointers across saved Lisp cores as the foreign-library may move across sessions. ExamplesCFFI> (foreign-symbol-pointer "errno") => #<A Mac Pointer #xA0008130> CFFI> (foreign-symbol-pointer "strerror") => #<A Mac Pointer #x9002D0F8> CFFI> (foreign-funcall-pointer * () :int (mem-ref ** :int) :string) => "No such file or directory" | See also |