From c8b15f64a000c09d6ab68802d55d8eec1705e5ff Mon Sep 17 00:00:00 2001 From: David Xu Date: Sun, 9 Aug 2015 13:56:13 -0400 Subject: Add user documentation to the export package extension. --- Doc/Manual/Lisp.html | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'Doc') 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 intern_function ensures that all C names are lispsort_double;, here we are using an additional feature which allows us to use our lispify function.

-

The export feature allows us to export the symbols. The inline - feature declaims the declared function as inline. The rename - directive allows us to change the name(it is useful when - generating C wrapper code for handling overloaded - functions). The ignore directive ignores a certain - declaration. +

The export feature allows us to export the symbols. If + the package argument is given, then the symbol will be exported to + the specified Lisp package. The inline feature declaims the + declared function as inline. The rename directive allows us to + change the name(it is useful when generating C wrapper code for handling + overloaded functions). The ignore directive ignores a certain + declaration.

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 intern_function 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) -- cgit v1.2.1