projects/cffi/cffi.git
2 years agoGroveler: fix priting of symbol names and docstrings grovel++
Stelian Ionescu [Mon, 3 Jan 2011 14:23:17 +0000] 
Groveler: fix priting of symbol names and docstrings

2 years agoMove the loading of implementation-specific modules to cffi-grovel.asd
Stelian Ionescu [Mon, 3 Jan 2011 14:22:45 +0000] 
Move the loading of implementation-specific modules to cffi-grovel.asd

2 years agoRewrite groveler to use C++
Stelian Ionescu [Wed, 20 Oct 2010 22:31:23 +0000] 
Rewrite groveler to use C++

2 years agoOops, fix RELOAD-FOREIGN-LIBRARIES
Stelian Ionescu [Mon, 3 Jan 2011 14:14:59 +0000] 
Oops, fix RELOAD-FOREIGN-LIBRARIES

2 years agoQuote VAL in all necessary places in BSET
Stelian Ionescu [Sun, 2 Jan 2011 22:22:30 +0000] 
Quote VAL in all necessary places in BSET

2 years agoAdd function RELOAD-FOREIGN-LIBRARIES
Stelian Ionescu [Sun, 2 Jan 2011 22:06:41 +0000] 
Add function RELOAD-FOREIGN-LIBRARIES

RELOAD-FOREIGN-LIBRARIES &KEY (TEST #'FOREIGN-LIBRARY-LOADED-P)

Useful especially when saving an image to reload libraries when the
image is re-started.
Pushing #'CFFI:RELOAD-FOREIGN-LIBRARIES to the implementation's
*INIT-HOOKS*(or equivalent) should suffice for most cases

2 years agocffi-uffi-compat: implement UFFI's foreign string encoding support.
Luís Oliveira [Sun, 5 Dec 2010 14:00:27 +0000] 
cffi-uffi-compat: implement UFFI's foreign string encoding support.

2 years agoFix {LOAD,CLOSE}-FOREIGN-LIBRARY to accept pathnames again
Stelian Ionescu [Thu, 4 Nov 2010 21:47:43 +0000] 
Fix {LOAD,CLOSE}-FOREIGN-LIBRARY to accept pathnames again

2 years agoFix grovel wrapper generators, add type checking to LISP-NAME and FOREIGN-NAME
Stelian Ionescu [Sun, 24 Oct 2010 14:14:13 +0000] 
Fix grovel wrapper generators, add type checking to LISP-NAME and FOREIGN-NAME

2 years agoFix DEFWRAPPER, following changes to cffi::{foreign,lisp}-name
Stelian Ionescu [Sat, 9 Oct 2010 23:51:29 +0000] 
Fix DEFWRAPPER, following changes to cffi::{foreign,lisp}-name

2 years agoRewrite PARSE-NAME-AND-OPTIONS to make it more comprehensible
Stelian Ionescu [Sun, 19 Sep 2010 21:28:10 +0000] 
Rewrite PARSE-NAME-AND-OPTIONS to make it more comprehensible

Add tests too

2 years agoMerge remote branch 'clnet/master'
Stelian Ionescu [Sun, 19 Sep 2010 20:28:09 +0000] 
Merge remote branch 'clnet/master'

2 years agoBuild grovel-wrappers with the same CFLAGS used by ECL to compile FASLs
Stelian Ionescu [Sun, 19 Sep 2010 20:18:39 +0000] 
Build grovel-wrappers with the same CFLAGS used by ECL to compile FASLs

2 years agoAdd MacPorts include path to *cc-flags* on OSX
Stelian Ionescu [Sun, 19 Sep 2010 19:31:13 +0000] 
Add MacPorts include path to *cc-flags* on OSX

2 years agoFix building grovel-wrappers on Windows
Stelian Ionescu [Sun, 19 Sep 2010 19:26:04 +0000] 
Fix building grovel-wrappers on Windows

Don't use -fPIC on those systems

2 years agoUpdate email address
Stelian Ionescu [Sun, 19 Sep 2010 19:18:49 +0000] 
Update email address

2 years agoImprove foreign library support
Stelian Ionescu [Sun, 19 Sep 2010 19:01:40 +0000] 
Improve foreign library support

* add a PRINT-OBJECT method for foreign libraries
* signal FOREIGN-LIBRARY-UNDEFINED-ERROR instead of a SIMPLE-ERROR in
  LOAD-FOREIGN-LIBRARY
* keep around the library name used for opening, add reader
  FOREIGN-LIBRARY-NAME

2 years agoFix closing shared libraries on CCL
Stelian Ionescu [Sun, 19 Sep 2010 18:37:48 +0000] 
Fix closing shared libraries on CCL

If a library is dependen upon by another one loaded in the image, then
CCL:CLOSE-SHARED-LIBRARY will end up in an endless loop, because it
tries to repeatedly call dlclose() until it succeeds

2 years agoImprove Darwin compatibility in tests/GNUmakefile
Luís Oliveira [Thu, 9 Sep 2010 00:12:13 +0000] 
Improve Darwin compatibility in tests/GNUmakefile

Patch courtesy of Dorian Taylor, lp#631972.

2 years agouffi-compat: change handling of :char to match UFFI's actual behaviour.
Luís Oliveira [Mon, 6 Sep 2010 21:16:14 +0000] 
uffi-compat: change handling of :char to match UFFI's actual behaviour.

Patch courtesy of Gustavo Milare.

2 years agoFix handling of (defcfun nil ...)
Luís Oliveira [Mon, 6 Sep 2010 21:07:02 +0000] 
Fix handling of (defcfun nil ...)

FOREIGN-NAME was looping endlessly on this case.

Patch courtesy of Nikodemus Siivola.

2 years agoAdd *.fasl and .DS_Store to .gitignore.
Luís Oliveira [Sun, 22 Aug 2010 21:02:14 +0000] 
Add *.fasl and .DS_Store to .gitignore.

2 years agoUpdate Emily Backes's copyrights.
Luís Oliveira [Sun, 22 Aug 2010 21:01:27 +0000] 
Update Emily Backes's copyrights.

2 years agoMoving repository to git. v0.10.6
Luís Oliveira [Sun, 22 Aug 2010 12:42:31 +0000] 
Moving repository to git.

- Added .gitignore.
- Adapted release.sh script to git.
- Removed :version from cffi.asd. Release tarballs now get the release
  version inserted into the tarball's cffi.asd.
- Update manual with git info.

3 years agoWrap the definitions of groveler classes in EVAL-WHEN
Stelian Ionescu [Thu, 20 May 2010 09:14:19 +0000] 
Wrap the definitions of groveler classes in EVAL-WHEN

3 years agoGroveler: allow the use of groveler classes as keywords in .asd files
François-René Rideau [Thu, 20 May 2010 05:02:52 +0000] 
Groveler: allow the use of groveler classes as keywords in .asd files

3 years agoGroveler: print offsets as long
François-René Rideau [Thu, 20 May 2010 05:00:01 +0000] 
Groveler: print offsets as long

3 years agoGroveler: better names for type detection macros
François-René Rideau [Thu, 20 May 2010 04:59:14 +0000] 
Groveler: better names for type detection macros

3 years agoGroveler: before compiling a shared library, remove old one
François-René Rideau [Thu, 20 May 2010 04:57:52 +0000] 
Groveler: before compiling a shared library, remove old one

3 years agoGroveler: fix offsetof macro
François-René Rideau [Thu, 20 May 2010 04:55:36 +0000] 
Groveler: fix offsetof macro

3 years agoFix cffi.asd for ASDF2
François-René Rideau [Thu, 20 May 2010 04:54:32 +0000] 
Fix cffi.asd for ASDF2

3 years agocffi-ecl: always push no-long-long
Luis Oliveira [Wed, 28 Apr 2010 22:56:04 +0000] 
cffi-ecl: always push no-long-long

LONG-LONG is not supported by ECL's interpreter yet.

3 years agocffi-tests: don't use FOREIGN-FREE for malloc()ed memory
Luis Oliveira [Wed, 28 Apr 2010 22:53:37 +0000] 
cffi-tests: don't use FOREIGN-FREE for malloc()ed memory

Patch courtesy of Juan Jose Garcia-Ripoll.

3 years agoNew pointer-related tests
Luis Oliveira [Wed, 28 Apr 2010 22:42:43 +0000] 
New pointer-related tests

Testing error situations for some pointer operations.

3 years agocffi-ecl: simplify shareable vector implementation
Luis Oliveira [Sun, 25 Apr 2010 23:12:32 +0000] 
cffi-ecl: simplify shareable vector implementation

Patch courtesy of Juan Jose Garcia-Ripoll.

3 years agocffi-ecl: inline %mem-set and %mem-ref
Luis Oliveira [Sun, 25 Apr 2010 23:02:19 +0000] 
cffi-ecl: inline %mem-set and %mem-ref

Patch courtesy of Juan Jose Garcia-Ripoll.

3 years agocffi-ecl: use C-INLINE when producing compiled code
Luis Oliveira [Sun, 25 Apr 2010 22:50:04 +0000] 
cffi-ecl: use C-INLINE when producing compiled code

Using the ECL extension EXT:WITH-BACKEND, CFFI can produce code that
works differently when using the interpreter than when using the
lisp2C compiler. This leads to more efficient code. This change is
backwards compatible.

Patch courtesy of Juan Jose Garcia-Ripoll.

3 years agocffi-ecl: reexport NULL-POINTER-P from SI
Luis Oliveira [Sun, 25 Apr 2010 22:39:14 +0000] 
cffi-ecl: reexport NULL-POINTER-P from SI

Patch courtesy of Juan Jose Garcia-Ripoll.

3 years agocffi-ecl: use ECL's :long-long feature
Luis Oliveira [Sun, 25 Apr 2010 22:37:48 +0000] 
cffi-ecl: use ECL's :long-long feature

Patch courtesy of Juan Jose Garcia-Ripoll.

3 years agoAllegro: fix WITH-FOREIGN-POINTER
Luis Oliveira [Sun, 25 Apr 2010 12:24:43 +0000] 
Allegro: fix WITH-FOREIGN-POINTER

- Fixes previous patch.
- New test: WITH-FOREIGN-POINTER.CONSTANT-SIZE.

3 years agoAllow the use of constants in WITH-FOREIGN-OBJECT for Allegro.
Jianshi Huang [Wed, 21 Apr 2010 09:19:56 +0000] 
Allow the use of constants in WITH-FOREIGN-OBJECT for Allegro.

3 years agoRemove unused C macro SIGNED_ from common.h
Stelian Ionescu [Fri, 19 Feb 2010 17:33:53 +0000] 
Remove unused C macro SIGNED_ from common.h

3 years agocffi-manual: navigation improvements.
Luis Oliveira [Wed, 6 Jan 2010 23:21:10 +0000] 
cffi-manual: navigation improvements.

- Add WITH-FOREIGN-OBJECTS and WITH-FOREIGN-STRINGS to the
  dictionary menus. (This unfortunately seems to require
  specifying the @node declarations in full.)
- Make the table of contents more manageable by turning
  @unnumberedsecs into @headings.
- Fix docstring in DEFSTRUCT example.

3 years agocffi-lispworks: add IGNORE declaration to CREATE-FOREIGN-FUNCALLABLE
Luis Oliveira [Fri, 1 Jan 2010 17:46:35 +0000] 
cffi-lispworks: add IGNORE declaration to CREATE-FOREIGN-FUNCALLABLE

3 years agocffi-lispworks: make null-pointer-p check its argument's type
Luis Oliveira [Fri, 1 Jan 2010 17:45:29 +0000] 
cffi-lispworks: make null-pointer-p check its argument's type

3 years agoDocumentation: add note about RT, update description of no-long-long.
Luis Oliveira [Fri, 1 Jan 2010 17:34:43 +0000] 
Documentation: add note about RT, update description of no-long-long.

3 years agoPreliminary support for ABCL.
Luis Oliveira [Fri, 1 Jan 2010 17:26:00 +0000] 
Preliminary support for ABCL.

3 years agoUpdate email address.
Stelian Ionescu [Fri, 11 Dec 2009 16:49:38 +0000] 
Update email address.

3 years agoRemove spurious PRINT call.
Stelian Ionescu [Fri, 11 Dec 2009 16:49:09 +0000] 
Remove spurious PRINT call.

3 years agocffi-manual: the :STRING type does not support ub8 arrays anymore
Luis Oliveira [Tue, 24 Nov 2009 23:20:02 +0000] 
cffi-manual: the :STRING type does not support ub8 arrays anymore

3 years agolibtest: support 64-bit on OSX Leopard
Luis Oliveira [Tue, 24 Nov 2009 23:17:41 +0000] 
libtest: support 64-bit on OSX Leopard

3 years agocffi-tests: show Lispworks the full path to libm.dylib
Luis Oliveira [Tue, 24 Nov 2009 23:14:42 +0000] 
cffi-tests: show Lispworks the full path to libm.dylib

3 years agocffi-lispworks: turns out Lispworks does support llong on 32-bit platforms
Luis Oliveira [Tue, 24 Nov 2009 23:13:21 +0000] 
cffi-lispworks: turns out Lispworks does support llong on 32-bit platforms

3 years agoDeprecate groveler clause FLAG in favour of CC-FLAGS.
Stelian Ionescu [Sun, 23 Aug 2009 12:11:08 +0000] 
Deprecate groveler clause FLAG in favour of CC-FLAGS.

3 years agocffi-allegro: define long long types on 64-bit platforms
Luis Oliveira [Fri, 21 Aug 2009 21:00:52 +0000] 
cffi-allegro: define long long types on 64-bit platforms

Patch courtesy of John Fremlin.

3 years agocffi-tests: fix pointer-to-integer casts in libtest.c
Luis Oliveira [Fri, 21 Aug 2009 20:54:47 +0000] 
cffi-tests: fix pointer-to-integer casts in libtest.c

3 years agocffi-tests: don't use stdcall #ifndef WIN32
Luis Oliveira [Fri, 21 Aug 2009 20:51:44 +0000] 
cffi-tests: don't use stdcall #ifndef WIN32

3 years agoAlso canonicalize search paths in library specs.
Stelian Ionescu [Sun, 9 Aug 2009 00:53:56 +0000] 
Also canonicalize search paths in library specs.

3 years agoUpdate manual.
Stelian Ionescu [Sat, 8 Aug 2009 22:28:34 +0000] 
Update manual.

DEFCFUN & co. now take only :CONVENTION.

3 years agoWhitespace.
Stelian Ionescu [Sat, 8 Aug 2009 22:15:47 +0000] 
Whitespace.

3 years agoDeclare DEFCALLBACK, DEFCFUN and DEFINE-FOREIGN-LIBRARY's keyword args :CCONV and...
Stelian Ionescu [Sat, 8 Aug 2009 22:10:55 +0000] 
Declare DEFCALLBACK, DEFCFUN and DEFINE-FOREIGN-LIBRARY's keyword args :CCONV and :CALLING-CONVENTION obsolete, use :CONVENTION instead.

3 years agoFix docstring of LIST-FOREIGN-LIBRARIES.
Stelian Ionescu [Fri, 7 Aug 2009 16:41:16 +0000] 
Fix docstring of LIST-FOREIGN-LIBRARIES.

3 years agoFix reloading a library in LOAD-FOREIGN-LIBRARY.
Stelian Ionescu [Fri, 7 Aug 2009 16:27:33 +0000] 
Fix reloading a library in LOAD-FOREIGN-LIBRARY.

3 years agoUse type :wrapper for wrapper libraries generated by the groveler.
Stelian Ionescu [Tue, 4 Aug 2009 20:41:32 +0000] 
Use type :wrapper for wrapper libraries generated by the groveler.

3 years agoUse type :test for the test libraries.
Stelian Ionescu [Mon, 20 Jul 2009 15:43:12 +0000] 
Use type :test for the test libraries.

3 years agoAdd the ability to specify a foreign library's type and search path.
Stelian Ionescu [Mon, 20 Jul 2009 15:40:28 +0000] 
Add the ability to specify a foreign library's type and search path.

Also export:
- FOREIGN-LIBRARY
- FOREIGN-LIBRARY-PATHNAME
- FOREIGN-LIBRARY-TYPE
- FOREIGN-LIBRARY-LOADED-P
- LIST-FOREIGN-LIBRARIES

3 years agoCosmetic changes (cconv -> calling-convention).
Stelian Ionescu [Mon, 20 Jul 2009 15:39:25 +0000] 
Cosmetic changes (cconv -> calling-convention).

3 years agoGroveler fixes for ECL.
Stelian Ionescu [Tue, 4 Aug 2009 19:37:38 +0000] 
Groveler fixes for ECL.

3 years agoECL: support more vector types in CFFI-SYS:WITH-POINTER-TO-VECTOR-DATA
Luis Oliveira [Sat, 25 Jul 2009 23:13:30 +0000] 
ECL: support more vector types in CFFI-SYS:WITH-POINTER-TO-VECTOR-DATA

Patch courtesy of Andy Hefner.

3 years agocffi-openmcl: prepend _ to external names on #+darwin, not just #+darwinppc
Luis Oliveira [Fri, 10 Jul 2009 18:08:32 +0000] 
cffi-openmcl: prepend _ to external names on #+darwin, not just #+darwinppc

3 years agogrovel: don't use cffi-features.
Luis Oliveira [Thu, 2 Jul 2009 20:15:57 +0000] 
grovel: don't use cffi-features.

3 years agoclisp: small fix to %FOREIGN-ALLOC
Luis Oliveira [Wed, 1 Jul 2009 18:59:18 +0000] 
clisp: small fix to %FOREIGN-ALLOC

- Deal with (%foreign-alloc 0) gracefully by turning it into a one byte
  allocation. This is similar to what glibc's malloc() does, IIUC.
- Regression test: FOREIGN-ALLOC.6.

Reported by Tobias Rautenkranz.

3 years agoDon't trim #\VT.
Stelian Ionescu [Thu, 25 Jun 2009 16:43:15 +0000] 
Don't trim #\VT.

3 years agoGroveler: trim-whitespace not strip-whitespace.
Stelian Ionescu [Mon, 22 Jun 2009 21:52:52 +0000] 
Groveler: trim-whitespace not strip-whitespace.

3 years agoGroveler: fix typo.
Stelian Ionescu [Mon, 22 Jun 2009 21:33:53 +0000] 
Groveler: fix typo.

3 years agoGroveler: small refactoring, create *EXE-EXTENSION*
Stelian Ionescu [Mon, 22 Jun 2009 21:26:26 +0000] 
Groveler: small refactoring, create *EXE-EXTENSION*

3 years agoGroveler: move boilerplate C code to common.h
Stelian Ionescu [Mon, 22 Jun 2009 21:18:57 +0000] 
Groveler: move boilerplate C code to common.h

3 years agoGroveller: fix usage of *CC-FLAGS*.
Stelian Ionescu [Mon, 22 Jun 2009 20:51:42 +0000] 
Groveller: fix usage of *CC-FLAGS*.

3 years agoInclude <string.h> with the groveler boilerplate code.
Stelian Ionescu [Mon, 22 Jun 2009 20:13:24 +0000] 
Include <string.h> with the groveler boilerplate code.

3 years agoMove the DEFPACKAGE and INVOKE out of grovel.lisp
Stelian Ionescu [Mon, 22 Jun 2009 20:03:17 +0000] 
Move the DEFPACKAGE and INVOKE out of grovel.lisp

3 years agoStyle change.
Stelian Ionescu [Mon, 22 Jun 2009 19:45:57 +0000] 
Style change.

3 years agoGroveler: use WITH-STANDARD-IO-SYNTAX when processing grovel files.
Stelian Ionescu [Mon, 22 Jun 2009 19:04:29 +0000] 
Groveler: use WITH-STANDARD-IO-SYNTAX when processing grovel files.

3 years agoGroveler: implement %INVOKE for ABCL.
Stelian Ionescu [Mon, 22 Jun 2009 19:03:26 +0000] 
Groveler: implement %INVOKE for ABCL.

3 years agoupdate cffi.asd for version 0.10.5 v0.10.5
Luis Oliveira [Tue, 16 Jun 2009 16:19:44 +0000] 
update cffi.asd for version 0.10.5

3 years agocffi-manual: minor style change.
Luis Oliveira [Tue, 16 Jun 2009 16:18:26 +0000] 
cffi-manual: minor style change.

3 years agoUpdate docs for groveler clause CONSTANT.
Stelian Ionescu [Tue, 16 Jun 2009 16:05:19 +0000] 
Update docs for groveler clause CONSTANT.

3 years agogrovel: remove comment about the *CC* and the CC environment variable
Luis Oliveira [Mon, 15 Jun 2009 17:07:33 +0000] 
grovel: remove comment about the *CC* and the CC environment variable

We already do look at CC in GROVEL::CC-COMPILE-AND-LINK.

3 years agocffi-grovel: use "cc" on non-Windows platforms (including Cygwin)
Luis Oliveira [Mon, 15 Jun 2009 15:13:12 +0000] 
cffi-grovel: use "cc" on non-Windows platforms (including Cygwin)

3 years agoclisp: avoid using NIL for null pointers.
Luis Oliveira [Sun, 14 Jun 2009 18:16:43 +0000] 
clisp: avoid using NIL for null pointers.

- Work around FFI:C-POINTER in %MEM-REF, %FOREIGN-FUNCALL and %DEFCALLBACK.
- Don't accept NIL in POINTERP, FOREIGN-POINTER or INC-POINTER.
- New tests: CALLBACKS.NIL-FOR-NULL, FUNCALL.POINTER-NOT-NIL, POINTER.NULL
  and FOREIGN-POINTER-TYPE.NIL.

3 years agoGroveler: add support for float constants.
Stelian Ionescu [Mon, 8 Jun 2009 14:29:44 +0000] 
Groveler: add support for float constants.

The CONSTANT groveler form now takes an additional keyword argument
TYPE, which defaults to INTEGER. In order to grovel floats,
DOUBLE-FLOAT must be used.

3 years agocffi-tests.asd: use trivial-features.
Luis Oliveira [Thu, 4 Jun 2009 13:05:25 +0000] 
cffi-tests.asd: use trivial-features.

- Using #-windows instead of #-(or win32 mswindows) which didn't work
  on Clozure CL.

3 years agoAdd stdcall support for callbacks in Clozure CL.
Luis Oliveira [Thu, 4 Jun 2009 12:42:41 +0000] 
Add stdcall support for callbacks in Clozure CL.

3 years agocffi-manual: fix code rot in the DEFCVAR example
Luis Oliveira [Tue, 26 May 2009 19:47:15 +0000] 
cffi-manual: fix code rot in the DEFCVAR example

Reported by Tobias Rautenkranz.

3 years agoFix bug in FOREIGN-FUNCALL.
Luis Oliveira [Tue, 26 May 2009 19:37:11 +0000] 
Fix bug in FOREIGN-FUNCALL.

CFFI::PARSE-ARGS-AND-TYPES was inadvertently suppressing arguments with
NIL values. E.g.: (foreign-funcall "foo" :foo a :bar nil :baz b :void)
was compiled as (foreign-funcall "foo" :foo a :baz b :void).

Reported by "D.I."

3 years agoFix the FOREIGN-STRUCT-SLOT-SET compiler macro for aggregate slots.
Luis Oliveira [Tue, 26 May 2009 19:09:29 +0000] 
Fix the FOREIGN-STRUCT-SLOT-SET compiler macro for aggregate slots.

Reported by Andy Hefner.

4 years agoBind *PACKAGE* in PROCESS-GROVEL-FILE.
Stelian Ionescu [Wed, 29 Apr 2009 20:25:05 +0000] 
Bind *PACKAGE* in PROCESS-GROVEL-FILE.

Reported by Zach Smith, patch by Nikodemus Siivola.

4 years agoMinor manual fixes.
Luis Oliveira [Tue, 7 Apr 2009 19:02:03 +0000] 
Minor manual fixes.

- Fixed one of the foreign-funcall-pointer examples.
- Improved the defcallback description.

Reported by Naveen Garg.

4 years agoMake sure that 64bit constants are groveled correctly on 32bit platforms.
Stelian Ionescu [Mon, 2 Feb 2009 01:22:03 +0000] 
Make sure that 64bit constants are groveled correctly on 32bit platforms.

4 years agoupdate cffi.asd for version 0.10.4 v0.10.4
Luis Oliveira [Sun, 1 Feb 2009 18:16:53 +0000] 
update cffi.asd for version 0.10.4

4 years agocffi-allegro: WITH-POINTER-TO-VECTOR-DATA fix
Luis Oliveira [Tue, 27 Jan 2009 21:43:36 +0000] 
cffi-allegro: WITH-POINTER-TO-VECTOR-DATA fix

- Also, export both W-P-T-V-D and MAKE-SHAREABLE-BYTE-VECTOR from
  CFFI-SYS and remove shareable vector tests from the expected failures
  list.

Fix courtesy of John Fremlin.