04/05/2006: mutandiz

[allegrocl]
	    Fix output typemap of char so it produces a character instead
	    of an integer. Also adds input/output typemaps for 'char *'.

	    add command-line argument -isolate to generate an interface
	    file that won't interfere with other SWIG generated files that
	    may be used in the same application.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9042 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Mikel Bancroft 2006-04-06 06:28:53 +00:00
commit 497228ec04
5 changed files with 43 additions and 13 deletions

View file

@ -242,7 +242,7 @@ $body)"
%insert("lisphead") %{
;; $Id$
(eval-when (compile eval)
(eval-when (compile load eval)
;;; You can define your own identifier converter if you want.
;;; Use the -identifier-converter command line argument to
@ -258,7 +258,7 @@ $body)"
(let* ((info (second form))
(id (car info))
(id-args (cddr info)))
(apply swig:*swig-identifier-converter* id id-args)))
(apply *swig-identifier-converter* id id-args)))
(defmacro defswig1 (name (&rest args) &body body)
`(progn (defmacro ,name ,args
@ -268,7 +268,7 @@ $body)"
(defmacro defswig2 (name (&rest args) &body body)
`(progn (defmacro ,name ,args
,@body)
(excl::define-simple-parser ,name second)))
b (excl::define-simple-parser ,name second)))
(defun read-symbol-from-string (string)
(multiple-value-bind (result position)
@ -332,7 +332,7 @@ $body)"
(let ((args (list (if (consp symbol) (cadr symbol) symbol)
(or package *package*))))
(apply #'export args)
(pushnew args swig::*swig-export-list*))
(pushnew args *swig-export-list*))
symbol))
(defmacro swig-insert-id (name namespace &key (type :type) class)

View file

@ -53,7 +53,8 @@ INOUT_TYPEMAP(unsigned long,
(push (ff:fslot-value-typed (quote $*in_fftype) :c $out) ACL_result),
(setf (ff:fslot-value-typed (quote $*in_fftype) :c $out) $in));
INOUT_TYPEMAP(char,
(push (ff:fslot-value-typed (quote $*in_fftype) :c $out) ACL_result),
(push (code-char (ff:fslot-value-typed (quote $*in_fftype) :c $out))
ACL_result),
(setf (ff:fslot-value-typed (quote $*in_fftype) :c $out) $in));
INOUT_TYPEMAP(float,
(push (ff:fslot-value-typed (quote $*in_fftype) :c $out) ACL_result),
@ -66,6 +67,12 @@ INOUT_TYPEMAP(bool,
ACL_result),
(setf (ff:fslot-value-typed (quote $*in_fftype) :c $out) (if $in 1 0)));
INOUT_TYPEMAP(char *,
(push (ff:char*-to-string (ff:fslot-value-typed (quote $*in_fftype) :c $out))
ACL_result),
(setf (ff:fslot-value-typed (quote $*in_fftype) :c $out)
(ff:string-to-char* $in)))
%typemap(lisptype) bool *INPUT, bool &INPUT "boolean";
// long long support not yet complete