diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2015-09-09 22:32:43 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2015-09-09 22:32:43 +0100 |
commit | 0ee304188c1317fdaf5aaaa19d98bad96fc14e3c (patch) | |
tree | 505fb1228a84b5f49b90957b5c6c319d043c2fc6 /Doc | |
parent | 89f13b03dae3279ecbd6f8e6ac0e33e5bdc67e07 (diff) | |
parent | c8b15f64a000c09d6ab68802d55d8eec1705e5ff (diff) | |
download | swig-0ee304188c1317fdaf5aaaa19d98bad96fc14e3c.tar.gz |
Merge branch 'lyze-cffi-export-package'
* lyze-cffi-export-package:
Add user documentation to the export package extension.
Extend the export feature in the CFFI module to support exporting to a particular package.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/Manual/Lisp.html | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Doc/Manual/Lisp.html b/Doc/Manual/Lisp.html index 0b8d47846..d2bf316a4 100644 --- a/Doc/Manual/Lisp.html +++ b/Doc/Manual/Lisp.html @@ -284,9 +284,11 @@ Let's edit the interface file such that the C type "div_t*" is changed %feature("export"); %feature("inline") lispsort_double; - %feature("intern_function", "my-lispify") lispsort_double; +%feature("export", package="'some-other-package") lispsort_double; + %rename func123 renamed_cool_func; + %ignore "pointer_func"; %include "test.h" @@ -310,12 +312,13 @@ The feature <i>intern_function</i> ensures that all C names are lispsort_double;</i>, here we are using an additional feature which allows us to use our lispify function. </p> -<p>The <i>export</i> feature allows us to export the symbols. The <i>inline</i> - feature declaims the declared function as inline. The <i>rename</i> - directive allows us to change the name(it is useful when - generating C wrapper code for handling overloaded - functions). The <i>ignore</i> directive ignores a certain - declaration. +<p>The <i>export</i> feature allows us to export the symbols. If + the <i>package</i> argument is given, then the symbol will be exported to + the specified Lisp package. The <i>inline</i> feature declaims the + declared function as inline. The <i>rename</i> directive allows us to + change the name(it is useful when generating C wrapper code for handling + overloaded functions). The <i>ignore</i> directive ignores a certain + declaration. </p> <p>There are several other things which are possible, to see some example of usage of SWIG look at the Lispbuilder and wxCL @@ -381,7 +384,7 @@ The feature <i>intern_function</i> ensures that all C names are (n :int) (array :pointer)) -(cl:export '#.(my-lispify "lispsort_double" 'function)) +(cl:export '#.(my-lispify "lispsort_double" 'function) 'some-other-package) (cffi:defcenum #.(swig-lispify "color" 'enumname) #.(swig-lispify "RED" 'enumvalue :keyword) |