Mark Evenson [Tue, 26 Mar 2013 13:35:39 +0000]
cffi-abcl: promote :BYTE :SHORT and :WCHAR_T types in callbacks to :INT
Fixes tests for CALLBACKS.CHAR, CALLBACKS.UNSIGNED-CHAR,
CALLBACKS.SHORT, CALLBACKS.UNSIGNED-SHORT.
Mark Evenson [Tue, 26 Mar 2013 09:45:04 +0000]
cffi-abcl: try first to load the 64bit version of libffi under Solaris
Luís Oliveira [Tue, 2 Apr 2013 20:59:17 +0000]
cffi-abcl: minor stylistic tweaks and whitespace cleanup
Luís Oliveira [Tue, 2 Apr 2013 20:32:58 +0000]
Port release script to Lisp
Luís Oliveira [Tue, 2 Apr 2013 20:31:47 +0000]
cffi-manual: fix bitrot related to foreign libraries
Stelian Ionescu [Wed, 20 Mar 2013 23:51:05 +0000]
Groveler: add proper OUTPUT-FILES and INPUT-FILES methods
Fixes the bug that modifying a grovel-file or a wrapper-file caused
the auto-generated lisp file to just get recompiled without being
re-generated.
Stelian Ionescu [Wed, 20 Mar 2013 23:48:25 +0000]
Groveler: code cleanup
Stelian Ionescu [Tue, 19 Mar 2013 23:56:55 +0000]
Whitespace
Stelian Ionescu [Tue, 19 Mar 2013 16:06:30 +0000]
ABCL: nicer DEFCALLBACK expansion
Stelian Ionescu [Tue, 19 Mar 2013 15:55:08 +0000]
ABCL: load contribs at compile-time
Luís Oliveira [Mon, 25 Feb 2013 00:46:18 +0000]
Add test exercising old-style vs new-style inner struct access
Luís Oliveira [Sun, 24 Feb 2013 13:50:49 +0000]
Update README.
It's still a bit oriented towards the CFFI developer, rather than
potential users, but at least it doesn't revolve around a comparison
against UFFI which is not as relevant as it once was.
Stelian Ionescu [Sat, 23 Feb 2013 21:24:50 +0000]
tests: fix name of 32bit FSBV test library
Stelian Ionescu [Sat, 23 Feb 2013 20:48:03 +0000]
Move all warning logic back to WARN-IF-KW-OR-BELONGS-TO-CL
Stelian Ionescu [Sat, 23 Feb 2013 20:19:05 +0000]
Don't warn if we name FFI types using symbols in package COMMON-LISP
Stelian Ionescu [Sat, 23 Feb 2013 20:18:18 +0000]
manual: use explicit struct types
Stelian Ionescu [Sat, 23 Feb 2013 18:26:07 +0000]
Use explicit struct types in tests
Luís Oliveira [Sat, 23 Feb 2013 18:08:38 +0000]
manual: fix compilation errors and warnings
Akshay Srinivasan [Sat, 16 Feb 2013 19:42:40 +0000]
grovel: cosmetic changes to c-write.
CrLF0710 [Mon, 21 Jan 2013 02:17:44 +0000]
Fix BARE-STRUCT-TYPE-P & STRUCTURE-BY-VALUE-P
Stas Boukarev [Mon, 21 Jan 2013 07:48:19 +0000]
cffi-abcl: copy-in/copy-out implementation of with-pointer-to-vector-data
Stas Boukarev [Mon, 21 Jan 2013 06:58:22 +0000]
cffi-abcl: move *loaded-libraries* definition before it's used
Stas Boukarev [Sat, 12 Jan 2013 16:50:24 +0000]
cffi-abcl: global lookups in find-foreign-function and %foreign-symbol-pointer
Fixes issue with ABCL not finding things like "strcmp" when no libraries
are loaded.
Alejandro R Sedeño [Fri, 4 Jan 2013 01:19:10 +0000]
groveller: fix to work with new type syntax
Use C-WRITE instead of C-PRINT-SYMBOL when emitting types to deal with
the fact that some types are more than just one symbol now.
e.g. 'foo vs '(:struct foo) and '(:pointer (:struct foo))
Fixes: Bug 1065432
Liam Healy [Fri, 18 Jan 2013 15:32:43 +0000]
Merge pull request #21 from crlf0710/master
More library names and fix :sizet typo for windows. Expand affirmative return from structure-by-value-p to include typedefs, so that foreign function calls by value may use the typedefed names to declare variable. Includes tests.
CrLF0710 [Fri, 18 Jan 2013 13:04:25 +0000]
Modify STRUCTURE-BY-VALUE-P and include test cases
CrLF0710 [Fri, 18 Jan 2013 13:00:32 +0000]
cffi-libffi: libffi-win32 fix
Stas Boukarev [Wed, 19 Dec 2012 10:27:43 +0000]
cffi-abcl: pointerp and null-pointer-p should work on non-pointers.
Stas Boukarev [Tue, 18 Dec 2012 22:52:23 +0000]
ecl: si:find-foreign-symbol expects a base-string, coerce it.
Joshua Elsasser [Sat, 15 Dec 2012 16:09:05 +0000]
Expose struct slot type and count via FOREIGN-SLOT-TYPE and FOREIGN-SLOT-COUNT.
This is especially useful when the type and count have been groveled.
Joshua Elsasser [Sat, 24 Nov 2012 22:03:31 +0000]
Teach the groveler to print cstruct types which are lists of symbols.
This means that forms such as the following are allowed:
(cstruct foo "struct foo"
(mybar "mybar" :type (:struct bar)))
Joshua Elsasser [Thu, 22 Nov 2012 19:55:56 +0000]
Don't pass user-defined strings to printf().
This allows % to be safely used in lisp symbol names which pass
through the groveler, such as the following:
(cvar ("errno" %errno) :int)
Joshua Elsasser [Thu, 22 Nov 2012 19:41:45 +0000]
Teach the groveler's cstruct :type to guess type when :auto is given.
This means that integer size and signedness is determined by the
groveler in cases like this:
(cstruct autotype "struct mystruct"
(myint "myint" :type :auto)
(myarray "myarray" :type :auto :count :auto))
Joshua Elsasser [Thu, 22 Nov 2012 18:08:17 +0000]
Teach groveler cstruct :count :auto to work on arrays anywhere in the struct.
The :count :auto logic assumed the struct member was an array which
filled the remainder of the struct, and would generate incorrect cffi
cstruct forms when any other struct members followed one declared
:count :auto.
The following C struct definition and groveler cstruct form
demonstrate this:
struct charbuf {
char three_chars[3];
int clobbered_int
};
(cstruct charbuf "struct charbuf"
(three-chars "three_chars" :type :char :count :auto)
(clobbered-int "clobbered_int" :type :int))
Juan Jose Garcia Ripoll [Thu, 22 Nov 2012 20:40:40 +0000]
cffi-ecl: c-inline-function-pointer-call bugfix
The previous fix did not work with functions that return no values.
Surround the code with braces, so that the C compiler does not
complain about the extern declaration.
Juanjo Garcia-Ripoll [Thu, 22 Nov 2012 14:13:05 +0000]
cffi-ecl: support multiple FFI backends
Allow the ECL backend to support different combinations of FFI in
the same code by customizing a single special variable.
Mark Cox [Sat, 8 Dec 2012 05:47:04 +0000]
CFFI-GROVEL now uses ASDF operations to compile and load processed grovel and wrapper files.
Stas Boukarev [Sat, 24 Nov 2012 00:33:08 +0000]
FOREIGN-STRING-ALLOC: don't call NULL-TERMINATOR-LEN twice
Stas Boukarev [Fri, 23 Nov 2012 14:24:15 +0000]
foreign-free, sbcl: add (optimize speed) declaration, which avoids
consing aliens.
Liam M. Healy [Mon, 12 Nov 2012 00:46:33 +0000]
Restore default type class name
In defcstruct, there was a line, removed in
be6267709f, that set a
default type class name by appending "-TCLASS". Without this line,
the class will be directly FOREIGN-STRUCT-TYPE instead of a subclass.
This is acceptable if the translate methods are not going to be
redefined, but if they are, any change will apply to all instances
(including instances of subclasses of other structures, which may call
these with call-next-method). In fact, there is a check in
define-translation-method to prevent redefinition with that macro, but
of course a defmethod would be just as bad.
While in principal one can specify the :class argument, this isn't
always possible, for example, if the structure was made by groveling.
Even so, it is a bad idea to make a default which has the potential
for this kind of harm.
This fix now permits GSLL to compile and load correctly.
easye [Mon, 29 Oct 2012 15:14:29 +0000]
Arguments to CONCATENATE need to be sequences.
easye [Mon, 29 Oct 2012 15:03:43 +0000]
cffi-abcl-
20121028a: changes to cffi_0.10.7.1 Quicklisp 2012-10-13 for ABCL.
The interactive restart when reloading callbacks is no longer needed.
A callable function pointer is now returned by CALLBACK and
GET-CALLBACK, which wasn't the case previously.
Now down to 25 failing tests!
Callbacks "automacro-ly" now get a translation layer to convert back
from native types to ones which ABCL expects. This translation is
currently a work in progress, as not all cases are covered correctly.
(Stas Boukarev) MAKE-FUNCTION-POINTER typo.
Refactored to remove compile warnings about MAKE-IMMEDIATE-OBJECT.
CFFI-SYS::%LOAD-FOREIGN-LIBRARY tries harder to figure out which
library to load.
Docstrings added.
easye [Mon, 29 Oct 2012 14:58:27 +0000]
Fix Solaris compilation options.
The "-fPIC" flag will always be necessary when using GCC-derived compilers as I understand it.
Additionally, Solaris compilation options now unconditionally tries a
64bit build. Contemporary Solaris (since Solaris 10), are hybrid
32/64 bit environments where "uname -m" reports "i86pc". Whether one
wants the 32 or 64 bit version of the libraries depends on the type of
the Lisp implementation doing the loading, which is currently not
available in the environment in which make(1) is executing.
Luís Oliveira [Sun, 4 Nov 2012 14:24:14 +0000]
grovel: include <inttypes.h>
This header defines the PRI{fmt}{type} printf format specifiers used by
foreign-type-to-printf-specification.
Nicolas Martyanoff [Sun, 4 Nov 2012 13:43:55 +0000]
grovel: use the right printf specification for bitfields
The BITFIELD grovel syntax always used %i to print the foreign values. But
when the base type is larger than an int, the resulting values will be
incorrect.
We introduce the FOREIGN-TYPE-TO-PRINTF-SPECIFICATION function which returns a
printf string containing a single format specification for a foreign type, and
use it in the BITFIELD grovel syntax.
Orivej Desh [Tue, 21 Aug 2012 14:19:50 +0000]
doc: generate an info directory file
Luís Oliveira [Sun, 4 Nov 2012 13:19:34 +0000]
cffi-manual: fix foreign-string-to-lisp info entry
Jean-Claude Beaudoin [Mon, 20 Aug 2012 03:25:25 +0000]
Initial port to MKCL
Josh Marchán [Sun, 16 Sep 2012 13:32:09 +0000]
Special-case arm architectures.
Luís Oliveira [Sun, 3 Jun 2012 17:37:01 +0000]
doc: Update gendocs.sh's URL.
Nicolas Martyanoff [Sat, 19 May 2012 19:10:36 +0000]
groveller: call the C compiler with -I /usr/local/include/ on FreeBSD
On FreeBSD, GCC only looks in directories of the base
system (/usr/include). We need to manually add /usr/local/include if we want
to be able to bind libraries installed by packages or ports.
Liam M. Healy [Thu, 7 Jun 2012 03:11:14 +0000]
Add method expand-to-foreign-dyn-indirect foreign-type-alias
Add method expand-to-foreign-dyn-indirect for type foreign-type-alias so that foreign-string-type will be expanded correctly (as a pointer).
Liam M. Healy [Mon, 14 May 2012 13:18:36 +0000]
Load cffi-libffi and do FSBV tests in cffi-tests
Stelian Ionescu [Sun, 6 May 2012 14:54:34 +0000]
Create a function named die, use it for error messages
Stelian Ionescu [Sun, 6 May 2012 09:33:08 +0000]
Ignore TYPE in default method of EXPAND-TO-FOREIGN-DYN-INDIRECT
Stelian Ionescu [Sun, 6 May 2012 09:32:46 +0000]
Define BARE-STRUCT-TYPE-P for FOREIGN-TYPEDEFs
Liam M. Healy [Sat, 5 May 2012 15:32:22 +0000]
Tests for cffi-libffi working
Fix an error in the recursive call in libffi-type-pointer for
foreign-struct-type, now parse the slot-type, which is unparsed. This
makes FSBV.3 and FSBV.4 succeed. Removed quote from test FSBV.2; this
makes FSBV.2 succeed.
Luís Oliveira [Fri, 4 May 2012 13:37:57 +0000]
cffi-tests: make compilation of libtest2_32 and libfsbv_32 optional.
Liam M. Healy [Thu, 3 May 2012 16:15:33 +0000]
Remove *parse-bare-structs-as-pointers* binding in test
Luís Oliveira [Tue, 1 May 2012 03:14:30 +0000]
Rewrite backwards-compatibility mode for bare struct types.
* Instead of a special variable, the parsed struct type instance is now
annotated to let the type system know whether we're dealing with
deprecated semantics (struct type canonicalizes to :pointer) or not.
This approach should hopefully be much less error-prone.
* Disabled translations for bare structs.
* Fixed and commented out some bogus tests.
Stelian Ionescu [Mon, 30 Apr 2012 21:17:06 +0000]
Revert "Bind *PARSE-BARE-STRUCTS-AS-POINTERS* to T in #'MEM-AREF"
This broke other stuff, so revert until we understand what's happening
This reverts commit
944d33183d7b4965d6ea86b37138c6691cd160ca.
Luís Oliveira [Mon, 30 Apr 2012 21:17:33 +0000]
Merge branch 'bugfix-v0.10.7.1'
Stelian Ionescu [Mon, 30 Apr 2012 18:39:41 +0000]
Use new struct spec in DEFINE-C-STRUCT-WRAPPER
Stelian Ionescu [Mon, 30 Apr 2012 18:38:49 +0000]
Bind *PARSE-BARE-STRUCTS-AS-POINTERS* to T in #'MEM-AREF
Liam M. Healy [Fri, 20 Apr 2012 03:29:27 +0000]
Improve documentation of structure reference
Improved the documentation for Foreign Structure Types to more clearly
describe the behavior of mem-aref under the new structure reference
syntax and the compatibility of the bare structure reference with the
old behavior.
Liam M. Healy [Thu, 19 Apr 2012 17:51:21 +0000]
Fix compiler macro for mem-aptr (Stas Boukarev)
Luís Oliveira [Sat, 14 Apr 2012 19:27:40 +0000]
cffi-ecl: check for long-long support.
Luís Oliveira [Sat, 14 Apr 2012 19:27:22 +0000]
cffi-tests: don't attempt to create threads when Lisp doesn't support them.
Luís Oliveira [Sat, 14 Apr 2012 18:39:29 +0000]
cffi-tests: exclude encodings requiring BOM in STRING.ENCODINGS.ALL.BASIC.
Luís Oliveira [Sat, 14 Apr 2012 18:23:05 +0000]
cffi-tests: replace UTF-16 test with explicit UTF-16{BE,LE} versions.
Liam M. Healy [Sat, 14 Apr 2012 17:58:52 +0000]
Fix expand-to-foreign-dyn-indirect
Create a new function #'foreign-expand-runtime-translator-or-binding
which is what the methods
expand-to-foreign-dyn (value var body (type enhanced-foreign-type))
expand-to-foreign-dyn-indirect (value var body (type translatable-foreign-type))
both call. Previously, the body of that function was the body of the
first method, and the second method called that generic function.
This did not work as intended however, the result being that libffi
calls were passed the actual object instead of the pointer. This
change fixes that problem.
Luís Oliveira [Sat, 14 Apr 2012 17:28:11 +0000]
cffi-manual: fix TRANSLATE-NAME-FROM-FOREIGN example.
Luís Oliveira [Sat, 14 Apr 2012 17:25:34 +0000]
Apply CANONICALIZE-SYMBOL-NAME-CASE to symbols created via DEFCVAR.
Stelian Ionescu [Thu, 12 Apr 2012 13:31:34 +0000]
Fix typo: signed 64bit accessor is sb-sys:signed-sap-ref-64
Stelian Ionescu [Thu, 12 Apr 2012 13:31:34 +0000]
Fix typo: signed 64bit accessor is sb-sys:signed-sap-ref-64
Liam M. Healy [Sun, 25 Mar 2012 19:16:01 +0000]
New function expand-to-foreign-dyn-indirect
New function expand-to-foreign-dyn-indirect split out from
expand-to-foreign-dyn, and the latter function returned to its
definition as given in the tip of master,
ab10be4fb8. This function
is used if the optional argument 'indirect to translate-objects is T,
which in turn the case when functions are calling or return structures
by value.
Liam M. Healy [Fri, 23 Mar 2012 02:09:35 +0000]
Compiler macro for mem-aptr
Multi-level optimizations depending what arguments are constantp;
the constantp arguments need to be evaled.
Liam M. Healy [Sun, 18 Mar 2012 02:56:38 +0000]
Add libffi.so.6, libffi32.so.6 to unix load list
Ubuntu 11.10 ships with libffi6 and not libff5, so these libraries are
now added to the load list.
Liam M. Healy [Fri, 16 Mar 2012 04:12:27 +0000]
Change comment to refer to "libffi"
Comment referred to "FSBV" now corrected to "libffi". Other uses (the
tests and foreign library for tests, the *feature* symbol, and the
variable 'fsbvp resulting from fn-call-by-value-p) genuinely refer to
FSBV and not specifically libffi. Distinction: "FSBV" refers to all
calls of structures by value, whether accomplished with the help of
libffi or not (some compilers have FSBV built in), "libffi" refers to
the use of the libffi library whether or not for calling foreign
structures by value (there are other functions not yet made use of in
CFFI, but someday might).
Liam M. Healy [Fri, 16 Mar 2012 04:02:54 +0000]
Merge branch 'master' into libffi
Conflicts:
tests/GNUmakefile
Liam M. Healy [Fri, 16 Mar 2012 03:46:07 +0000]
Define a compiler macro for #'mem-aptr
Luís Oliveira [Sun, 11 Mar 2012 21:11:42 +0000]
cffi-abcl: implement callbacks.
Patch courtesy of Mark Evenson.
Luís Oliveira [Sun, 11 Mar 2012 21:11:16 +0000]
cffi-abcl: autoload JNA dependency.
Patch courtesy of Mark Evenson.
Luís Oliveira [Sat, 10 Mar 2012 10:54:31 +0000]
Add support for Digitool MCL.
Patch courtesy of James Anderson.
Liam M. Healy [Mon, 5 Mar 2012 04:32:44 +0000]
Update manual to include mem-aptr
Liam M. Healy [Thu, 1 Mar 2012 04:44:36 +0000]
Define mem-aptr; untested
New function mem-aptr will return the pointer to the requested element
of the array, and add documentation. It is untested.
Liam M. Healy [Sun, 12 Feb 2012 16:09:28 +0000]
Fix alloc_pair test return type syntax
Liam M. Healy [Sun, 5 Feb 2012 22:02:08 +0000]
Rename system to cffi-libffi, add restart to default *foreign-structures-by-value*
Liam M. Healy [Sat, 4 Feb 2012 18:10:52 +0000]
Use hash table for libffi-type-pointer
Use hash table for libffi-type-pointer instead of a class slot, and
simplify #'libffi-type-pointer methods. Remove obsolete package
definition file. Tests in cffi-tests not run due to error in load,
but GSLL tests pass.
Liam M. Healy [Sun, 29 Jan 2012 02:10:26 +0000]
Moved slots-in-order after foreign-struct-type, clean up libffi-*.lisp
Luís Oliveira [Thu, 26 Jan 2012 01:03:55 +0000]
cffi-abcl: fix bitrot. s/calling-convention/convention
Bug reported by Anton Vodonosov.
Liam M. Healy [Mon, 23 Jan 2012 20:10:20 +0000]
Fix conditionalization syntax in cffi-fsbv.asd
Liam M. Healy [Mon, 23 Jan 2012 14:54:06 +0000]
Add Windows grovel file
Added a Windows grovel file from CRLF0710, modified from the
standalone FSBV unix file. Minimally modified for CFFI with updated
header and package, not tested at all.
Liam M. Healy [Fri, 13 Jan 2012 04:34:18 +0000]
Eliminate package cffi-fsbv, put :sizet in keyword package
Luís Oliveira [Fri, 13 Jan 2012 01:31:49 +0000]
cffi-allegro: signal clearer error when [u]llong is unsupported
Luís Oliveira [Tue, 10 Jan 2012 22:11:05 +0000]
cffi-tests: fix bug in ullong(); mark expected failure.
DEFCFUN.UNSIGNED-LONG-LONG fails on Allegro: lp#914500.
Jianshi Huang [Fri, 6 Jan 2012 21:14:15 +0000]
minor fix for allegrocl's long-long support
Luís Oliveira [Sat, 7 Jan 2012 01:02:07 +0000]
New tests: DEFCFUN.UNSIGNED-LONG-LONG and FUNCALL.UNSIGNED-LONG-LONG.
Luís Oliveira [Fri, 6 Jan 2012 00:17:38 +0000]
cffi-tests: make compilation of 32-bit libtest optional.
Fixes lp#911557. Reported by Elias Pipping. Solution courtesy of
Daniel Herring.
Liam M. Healy [Fri, 25 Nov 2011 20:03:44 +0000]
Use soname with major version for libffi on unix
Use soname with major version for libffi on unix as advocated on
http://lispcaveats.tumblr.com/post/
13259176455/ffi-linking-against-shared-libraries.