Luis Oliveira [Fri, 8 Sep 2006 20:56:02 +0000]
Forgot to increment the version number in the .asd file again.
Luis Oliveira [Fri, 8 Sep 2006 20:38:05 +0000]
Fix some conflicts.
Note to self: do not use darcs amend-record with someone else's patch. Doh.
Luis Oliveira [Fri, 8 Sep 2006 16:15:04 +0000]
with-foreign-string: accept ub8 arrays.
- WITH-FOREIGN-STRING: check for (or string (array (unsigned-byte 8))).
- New tests: misc-types.string.ub8.[12].
asf [Thu, 7 Sep 2006 10:18:04 +0000]
Allow ub8 arrays to be autoconverted to foreign strings
Luis Oliveira [Fri, 8 Sep 2006 16:24:27 +0000]
Documentation update.
- Better document the :STRING type.
- Add documentation for the :STRING+PTR type.
- Update the documentation to reflect the recent changes to
string functions and macros that make them accept ub8 arrays.
- Document the "t" feature expression in DEFINE-FOREIGN-LIBRARY.
Luis Oliveira [Thu, 7 Sep 2006 10:22:49 +0000]
Bump ddl_version in libtest.c
asf [Thu, 7 Sep 2006 07:03:39 +0000]
Allow ub8 arrays to be autoconverted to foreign strings
asf [Thu, 7 Sep 2006 07:03:12 +0000]
Use array-total-size-limit as the max size for strings
Luis Oliveira [Wed, 6 Sep 2006 11:40:27 +0000]
Use the RTEST package nickname instead of RT because of Lispworks.
Luis Oliveira [Wed, 6 Sep 2006 10:13:36 +0000]
Backwards compatibility for cffi-clisp's foreign-funcall
Luis Oliveira [Tue, 5 Sep 2006 10:34:18 +0000]
Support for recent CVS versions of CLISP
- As of 2006-09-03, CLISP's FFI::FOREIGN-LIBRARY-FUNCTION takes
an additional argument. Accomodated this change.
Patch courtesy of Kevin Rosenberg.
Luis Oliveira [Tue, 5 Sep 2006 10:11:50 +0000]
[u]llong alignment issues on darwin/ppc
- CLISP: special case for :[unsigned-]long-long on darwin/ppc.
- SBCL: missing special case for :unsigned-long-long.
- New regression test: STRUCT.ALIGNMENT.8.
Luis Oliveira [Thu, 31 Aug 2006 15:31:30 +0000]
New TODO items about LOAD-FOREIGN-LIBRARY.
Luis Oliveira [Thu, 31 Aug 2006 15:30:39 +0000]
New macro: INCF-POINTER (with documentation)
Luis Oliveira [Thu, 31 Aug 2006 15:28:37 +0000]
Misc manual cleanups like s/
Luis Oliveira [Thu, 31 Aug 2006 15:24:23 +0000]
Update cffi-uffi-compat to reflect recent UFFI changes.
- Better handling of shared library extensions on Windows.
Patch courtesy of Kevin Rosenberg.
Luis Oliveira [Tue, 27 Jun 2006 01:18:58 +0000]
Add long-long support to CLISP
Patch courtesy of Frédéric Jolliton.
Luis Oliveira [Tue, 27 Jun 2006 01:05:20 +0000]
ECL fixes
- cffi-ecl fixes:
- push cffi-features:unix on darwin too.
- use si:load-foreign-module instead of ffi:load-foreign-library
on DFFI platforms.
- use convert-external-name in foreign-symbol-pointer.
- wrap defcvar's define-foreign-symbol around eval-when.
- simplify default-library-suffix
- cffi-tests:
- load libtest.o on ECL platforms without DFFI.
- conditionalize the tests with 127 arguments based on the
value of lambda-parameters-limit.
Stephen Compall [Tue, 13 Jun 2006 20:55:50 +0000]
review Foreign Types; add Glossary
Nathan Bird [Wed, 17 May 2006 20:12:39 +0000]
uffi-compat: in load-foreign-library, don't probe for file if no directory.
If it is just a filename without a directory, continue passing it down
to the underlying functions, as they probably know how to find a library
in default location.s
The test now matches the uffi behaviour too.
Luis Oliveira [Wed, 7 Jun 2006 18:30:00 +0000]
Run tests both compiled and uncompiled.
- Make the test-suite run both with and without rt::*compile-tests*
bound to T.
Luis Oliveira [Wed, 7 Jun 2006 02:23:58 +0000]
Huh. Found a very old and incomplete sentence in the manual.
Luis Oliveira [Wed, 7 Jun 2006 02:23:35 +0000]
Minor comestic change in foreign-vars.lisp
Luis Oliveira [Wed, 7 Jun 2006 02:23:25 +0000]
Lispworks bugfix: %mem-ref and %mem-set compiler macros
- The %mem-ref and %mem-set in cffi-lispworks.lisp were using
bogus indexes. FLI's documentation suggests foreign-typed-aref
expects array indexes but it seems to want offsets in bytes
instead.
- Regression tests: mem-ref.rt.1 and mem-ref.rt.2.
Luis Oliveira [Sat, 27 May 2006 02:04:11 +0000]
bugfix: accept symbols in defcvar
- Fix lisp-var-name to accept symbols.
- Regression test: foreign-globals.symbol-name
Luis Oliveira [Fri, 26 May 2006 11:36:26 +0000]
Minor simplification in tests/bindings.lisp
Luis Oliveira [Fri, 26 May 2006 11:34:37 +0000]
Fix some ECL bugs (maybe)
- Fixed some bitrot in cffi-ecl.lisp (maybe). Still can't test
properly because of an ECL bug related to make-load-form.
Luis Oliveira [Sat, 20 May 2006 18:13:44 +0000]
Fix uffi-compat bugs
- :pointer is no longer a built-in type so we have to parse it,
not find-type it.
- def-array-pointer actually defines an array type with 1 element.
(this emulates UFFI's behaviour)
Bug report and initial patches courtesy of Lou Vanek.
Luis Oliveira [Sun, 14 May 2006 23:42:18 +0000]
Fix problem with declarations in DEFCALLBACKs
- Place declarations after the translations take place.
- We no longer poke at ignore declarations in defcallback.
Stephen Compall [Fri, 12 May 2006 15:38:32 +0000]
change first automatic defbitfield value to 1
- make-foreign-bitfield now starts implicit bitfield values at 1. No
more special cases for zero.
- Document and update bf tests to match.
Stephen Compall [Thu, 11 May 2006 16:22:02 +0000]
defbitfield: explicit initial zero case
- Provide for counting an initial zero as a pseudo-single-bit.
- Test bitfield.4.
Stephen Compall [Thu, 11 May 2006 15:42:21 +0000]
only single-bits affect defbitfield implicit values
- Remove a case in which a non-single-bit like 3 could hijack the
implicit value computation for defbitfield.
- New test bitfield.3 for this behavior.
Luis Oliveira [Thu, 11 May 2006 14:50:35 +0000]
Fix defbitfield bug and new test
- Bug fix: when the first value was provided a (< foo nil) comparision
would occur. Regresion test: bitfield.1.
- New test bitfield.2.
Stephen Compall [Thu, 11 May 2006 07:21:06 +0000]
implicit defbitfield symbol values
- Foreign Type Translators: defctype does not create Lisp types; you
have to use eql specializers.
- enum.lisp: Use reduce in %foreign-bitfield-value. Code a default
rule for bitfield symbol values.
James Bielman [Sun, 7 May 2006 00:35:11 +0000]
Make :POINTER a parameterized foreign type.
- :POINTER without arguments is a void pointer.
- (:POINTER :INT) is a pointer to an :INT.
- These nest properly: (:POINTER (:POINTER :INT)).
- Pointers are not type checked yet---an optional pointer type checker
will be added someday.
James Bielman [Sun, 7 May 2006 00:28:29 +0000]
Bugfix: Quote type arguments to %DEFCFUN-VARARGS.
James Bielman [Thu, 4 May 2006 17:39:40 +0000]
Recognize OpenMCL/X86-64 and set CFFI features accordingly.
James Bielman [Thu, 4 May 2006 02:16:23 +0000]
Conditionalize against non-CPU specific word-size features in OpenMCL.
James Bielman [Thu, 4 May 2006 01:54:21 +0000]
Bugfix: Specialize UNPARSE for UFFI-CHAR in CFFI-UFFI-COMPAT.
- Fixes an error when loading FASL files that dumped UFFI-CHAR instead
of (UFFI-CHAR :CHAR) using MAKE-LOAD-FORM.
- Reported by Ricardo Boccato.
James Bielman [Wed, 3 May 2006 06:42:25 +0000]
More copyright header year updates.
James Bielman [Wed, 3 May 2006 06:39:44 +0000]
Update copyright year in file headers.
James Bielman [Wed, 3 May 2006 06:32:41 +0000]
Conditionally set variables for implementations in Makefile.
- Allow overriding from the environment as suggest in the comment, which
didn't actually work. (eg.: OPENMCL
James Bielman [Wed, 3 May 2006 06:16:37 +0000]
Add OpenMCL/X86-64 fasl files to 'make clean'.
Luis Oliveira [Mon, 24 Apr 2006 17:36:20 +0000]
Make corman's finalizers thread-safe (hopefully)
Luis Oliveira [Mon, 24 Apr 2006 02:53:57 +0000]
Add support for finalizers
- New functions: finalize and cancel-finalization.
- New cffi-"feature": no-finalizers. Only ECL pushes this.
- Document new functions.
Luis Oliveira [Mon, 24 Apr 2006 02:53:20 +0000]
Include stdint.h in libtest.c
Luis Oliveira [Mon, 24 Apr 2006 02:51:19 +0000]
Oops, forgot to bump the version number.
Luis Oliveira [Tue, 18 Apr 2006 01:13:09 +0000]
Make release.sh more suitable for versioned releases
Luis Oliveira [Tue, 18 Apr 2006 01:10:01 +0000]
More minor changes to cffi-tests
- add asdf:test-op to the cffi system
- mark a couple more cmucl failures
- get rid of the warning in libtest.c about comparing void* and
function pointer
Luis Oliveira [Fri, 14 Apr 2006 21:01:37 +0000]
Add 'all' target to doc/Makefile
Luis Oliveira [Fri, 14 Apr 2006 21:00:17 +0000]
update tests
- update dll version.
- add some CMUCL/darwin failures.
Luis Oliveira [Fri, 14 Apr 2006 20:58:10 +0000]
non-toplevel defcallback forms
- Add note to the manual about non-toplevel defcallback forms.
- Add a test for this (comment out, since it's not portable).
Luis Oliveira [Fri, 14 Apr 2006 20:49:18 +0000]
foreign-symbol-pointer changes
- Remove second argument from foreign-symbol-pointer.
- Update foreign-symbol-pointer documentation in the manual.
- New tests: funcall.f-s-p.1 and foreign-symbol-pointer.[12].
Luis Oliveira [Fri, 14 Apr 2006 20:48:52 +0000]
New TODO item: warn about :void
Stephen Compall [Mon, 27 Mar 2006 17:36:32 +0000]
remove *runtime-translator-form* from the interface
- Remove *runtime-translator-form* from the public interface, in favor
of (call-next-method).
- Describe this change in the manual, including some text from the
option 1 patch.
- Be clear that ALLOC-PARAM is thrown out by %expand-type-to-foreign.
Stephen Compall [Wed, 1 Mar 2006 19:41:22 +0000]
demonstrate differing behavior between foreign-dyn expansions
- change expand-type-to-foreign-dyn for foreign-typedef to not
short-circuit expand-type-to-foreign when falling back (see paste
17379)
- add tests showing that you can change the foreign-dyn expansion
semantics by providing an expand-to-foreign method that falls back
Luis Oliveira [Thu, 30 Mar 2006 21:50:53 +0000]
sbcl/win32: mark defcfun.undefined as an expected failure
Luis Oliveira [Thu, 30 Mar 2006 21:48:16 +0000]
cmucl: top-level-lambda-max
- Use (setf c::top-level-lambda-max 0) allowing compilation
of bindings without loading foreign libraries first.
- Change USE-FOREIGN-LIBRARY accordingly. This avoids the
error we got when loading a library twice (first at
compile-time, then at load-time).
Luis Oliveira [Thu, 30 Mar 2006 21:46:40 +0000]
Small doc changes.
- Rewrite paragraph about :float and :double.
- Fix typo in defbitfield example.
Stephen Compall [Tue, 28 Mar 2006 00:49:44 +0000]
manual-don't use PRINT-OBJECT for CONDITIONs
Stephen Compall [Thu, 16 Mar 2006 11:55:05 +0000]
small manual fixes
- Add convert-to-foreign, convert-from-foreign, and
free-converted-object to the master menu.
- (load-foreign-library): Add note about specifying directories in
paths.
- (defcfun): Typo in syntax.
Luis Oliveira [Thu, 16 Mar 2006 11:45:54 +0000]
Lispworks: use regression-test instead of rt.
Luis Oliveira [Thu, 16 Mar 2006 11:40:28 +0000]
SCL update + new cffi-sys primitive
- New cffi-sys primitive: canonicalize-symbol-name-case. Use this
instead of read-from-string. Also new tests for this.
- cffi-scl.lisp: correct the evaluation order of %MEM-REF and %MEM-SET.
Have 'foreign-symbol-pointer return 'nil if the symbol is not found.
- uffi-compat.lisp: better support for SCL.
- defcfun.lisp (defcfun.undefined): package at time of eval may differ
from the compile time package.
Patch courtesy of Douglas Crosher.
Luis Oliveira [Thu, 16 Mar 2006 11:28:18 +0000]
when (and ecl (not dffi)) cffi:load-foreign-library doesn't work
- mention this in the manual.
- make l-f-l signal an error on non-dffi ecl platforms.
Stephen Compall [Wed, 1 Mar 2006 04:33:49 +0000]
manual: convert-* interface, optimizing translators overview optimized
- (Wrapper generators): Add comment about the 30-90% figure.
- Reword `Pointers' to be shorter/clearer.
- Promote `Optimizing Type Translators' to a full section, a few other
things here, most conspicuously expanding on the note about expand-*
method definition time.
- (Tutorial-Conclusion): Not a first draft anymore.
- Document convert-to-foreign, convert-from-foreign, and
free-converted-object.
Luis Oliveira [Tue, 28 Feb 2006 19:36:23 +0000]
Remove known issues sub-section from the manual.
- Listing the expected failures in the manual is too much
trouble. Removed those.
- Also, renamed "The Scieneer Common Lisp" to "Scieneer CL"
for consistency.
Luis Oliveira [Tue, 28 Feb 2006 19:16:42 +0000]
TODO item about a pointer type, suggested by Jörg Höhle
Stephen Compall [Tue, 28 Feb 2006 16:26:38 +0000]
manual: strings, foreign allocation, add `Wrapper generators'
- Explain the difference between mem-aref and mem-ref by analogy with
C operators.
- Use ::
Luis Oliveira [Mon, 27 Feb 2006 19:48:54 +0000]
More testing
- Make defcfun.undefined an expected failure for SBCL on
non linkage-table platforms.
- New file: tests/misc.lisp.
- Added a couple of tests for cffi-features.
Luis Oliveira [Mon, 27 Feb 2006 19:48:13 +0000]
TODO item about our use of EVAL
Luis Oliveira [Sat, 25 Feb 2006 15:56:27 +0000]
Try to improve the wording in foreign-alloc's description..
Luis Oliveira [Sat, 25 Feb 2006 04:10:58 +0000]
Minor change to foreign-alloc's documentation
- make it slightly clearer that count can be omitted when
initial-contents is supplied.
- add reference to with-foreign-object.
Luis Oliveira [Sat, 25 Feb 2006 03:46:34 +0000]
foreign-alloc changes
- bugfix, foreign-alloc doesn't need to call translate-type-to-foreign
explicitly since mem-aref already does. Bug reported by Greg Pfeil.
- new keyword argument: NULL-TERMINATE-P.
- new regression tests for the bug described above and new tests for
the new keyword argument.
- document new argument.
Luis Oliveira [Fri, 24 Feb 2006 19:22:31 +0000]
More tests
- A couple of new tests involving defcfun/foreign-funcall/defcallback and
lots of doubles and floats. These were written to figure out what
exactly was going on with the CALLBACKS.BFF.[12] failures.
Luis Oliveira [Fri, 24 Feb 2006 13:17:35 +0000]
Fix cffi-lispworks bug in foreign-funcall.
- Add same declarations to define-foreign-funcallable as those used
for define-foreign-callable.
- Makes FUNCALL.FLOAT pass on linux/x86.
Luis Oliveira [Thu, 23 Feb 2006 06:17:57 +0000]
SCL port, courtesy of Douglas Crosher
- Makefile: new test-scl target. Add SCL's fasl file extensions
to the clean target.
- Remove SCL TODO item.
- New file: cffi-scl.lisp.
- New primitive type :long-double. Since it's only supported by
SCL, it's not worth adding a no-long-double feature just yet.
- New tests for :long-double.
- Add information about SCL and the new :long-double type to
the user manual.
Luis Oliveira [Thu, 23 Feb 2006 18:18:31 +0000]
Update TODO item about fixnums.
Luis Oliveira [Thu, 23 Feb 2006 08:14:06 +0000]
Implement and use my_llabs instead of llabs in tests
Luis Oliveira [Mon, 20 Feb 2006 04:48:13 +0000]
Make CLISP not throw an error on undefined functions
- Catch the error in %foreign-funcall and throw a warning instead.
- Regression test: DEFCFUN.UNDEFINED. (CMUCL fails)
James Bielman [Fri, 17 Feb 2006 20:44:57 +0000]
Fix LOOP indentation in backends.
- Thanks for Luís for showing me how to configure Emacs to get this right.
James Bielman [Thu, 16 Feb 2006 08:34:48 +0000]
Fix and add tests for %MEM-REF and %MEM-SET evaluation order.
- Some minor reformatting of LOOP forms to pacify cl-indent.
- Add new regression tests to check the evaluation order of
%MEM-REF and %MEM-SET.
- Add the necessary ONCE-ONLY forms to the compiler macros.
- Have the CFFI-TESTS package use CFFI-SYS for testing primitives.
Luis Oliveira [Thu, 16 Feb 2006 05:15:44 +0000]
Fix typo. extend -> extent
Luis Oliveira [Thu, 16 Feb 2006 05:07:35 +0000]
Minor change to tests/defcfun.lisp
- Remove unnecessary (setf (mem-ref s :char) 0) forms.
Luis Oliveira [Thu, 16 Feb 2006 04:55:47 +0000]
CFFI Manual update
- Update known issues (callback.bff.[12] failures).
- defbitfield, foreign-bitfield-symbols and foreign-bitfield-value.
- Fix typo in tutorial. defenum -> defcenum.
- New section "Other Types" documenting :string, :boolean and
:wrapper.
- Add note about the translate-* methods not being meant to be called
directly and suggesting convert-* instead.
- Document the macroexpansion-time translators in a new
"Optimizing Type Translators" sub-section.
- Document defcenum's base-type option.
- Document defcfun's varargs support.
Luis Oliveira [Thu, 16 Feb 2006 04:53:35 +0000]
New functions convert-to/from-foreign and free-converted-object
- These functions basically export the functionality of
translate-type-to-foreign, translate-type-from-foreign and
free-translated-object.
- TODO: document these.
Luis Oliveira [Thu, 16 Feb 2006 04:52:40 +0000]
New TODO item: defcfun compiler macros
James Bielman [Wed, 15 Feb 2006 22:25:59 +0000]
Implement compiler macros for %MEM-REF and %MEM-SET in LispWorks.
- Use FLI:FOREIGN-TYPED-AREF if available and dereferencing a number.
- Avoid calling INC-POINTER when the offset is a multiple of the type
size allowing direct use of the INDEX argument to FOREIGN-TYPED-AREF.
- Fall back to open-coding the call to FLI:DEREFERENCE otherwise.
James Bielman [Wed, 15 Feb 2006 21:34:42 +0000]
Delete LispWorks/Linux .ufsl files on make clean.
James Bielman [Wed, 15 Feb 2006 20:15:14 +0000]
Use C limits for foreign floats and doubles instead of Lisp's.
- Export 'float_min', 'float_max', 'double_min', and 'double_max' from
the libtest shared library with the values of FLT_MIN, FLT_MAX,
DBL_MIN, and DBL_MAX, respectively.
- Use *FLOAT-MIN*, *FLOAT-MAX*, *DOUBLE-MIN*, and *DOUBLE-MAX* as test
values for foreign floats/doubles instead of the Lisp constants
<foo>-POSITIVE-<bar>-FLOAT.
Luis Oliveira [Wed, 15 Feb 2006 17:43:16 +0000]
Oops, fix tests.
- MISC-TYPES.BOOLEAN.2 was using the wrong ff name.
- MISC-TYPES.EXPAND.* need the expand-* methods defined at
macroexpansion-time.
James Bielman [Wed, 15 Feb 2006 17:16:31 +0000]
Change +REQUIRED-DLL-VERSION+ to *REQUIRED-DLL-VERSION*.
James Bielman [Wed, 15 Feb 2006 09:13:37 +0000]
Remove completed TODO item about building 32 and 64 bit libtest.
Luis Oliveira [Wed, 15 Feb 2006 16:35:51 +0000]
A few more tests
- Tests for the new macroexpansion-time type translator interface:
MISC-TYPES.EXPAND.[1234]
- New tests: DEREF.LONG-LONG and DEREF.UNSIGNED-LONG-LONG.
- Tests for mem-ref with non-constant type arguments: DEREF.NONCONST.*
- Fix some comments in tests/memory.lisp.
- New test: MISC-TYPES.BOOLEAN.2 (accepting typedefs to integer types)
Luis Oliveira [Wed, 15 Feb 2006 03:01:52 +0000]
Minor test changes
- Use long instead of int in the big C functions in libtest.c.
- Mark callbacks.bff.[12] as expect failures for a couple of
lisps.
Luis Oliveira [Wed, 15 Feb 2006 02:59:06 +0000]
Make (%callback 'non-existant-callback) signal an error
- Make %callback signal an error for non-existing callbacks.
(allegro, sbcl and openmcl)
- Regression test: callbacks.non-existant
James Bielman [Wed, 15 Feb 2006 02:52:57 +0000]
Implement %MEM-REF and %MEM-SET compiler macros for Allegro CL.
James Bielman [Wed, 15 Feb 2006 02:26:51 +0000]
Ignore RETTYPE in Allegro CL %DEFCALLBACK.
Luis Oliveira [Tue, 14 Feb 2006 04:29:28 +0000]
Fix float varargs promotion.
- Convert floats to doubles in foreign-funcall-varargs. Test
DEFCFUN.VARARGS.FLOAT now passes.
Luis Oliveira [Tue, 14 Feb 2006 04:27:33 +0000]
Preliminary random tester.
- Push random-tester.lisp. This was used to generate the BFF tests,
but is still not automated.
- Update respective TODO item.
Luis Oliveira [Tue, 14 Feb 2006 03:28:30 +0000]
MORE TESTS
- New tests: callbacks.funcall.2, callbacks.bff.[12], defcfun.bff.[12].
- Re-enable defcfun.varargs.double.
- Use #'float instead of #'coerce in the defcfun.varargs.* tests.
- Fix dll version in libtest.c.