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.
This commit is contained in:
William S Fulton 2015-09-09 22:32:43 +01:00
commit 0ee304188c
3 changed files with 20 additions and 10 deletions

View file

@ -860,8 +860,11 @@ void CFFI::emit_struct_union(Node *n, bool un = false) {
}
void CFFI::emit_export(Node *n, String *name) {
if (GetInt(n, "feature:export"))
Printf(f_cl, "\n(cl:export '%s)\n", name);
if (GetInt(n, "feature:export")) {
String* package = Getattr(n, "feature:export:package");
Printf(f_cl, "\n(cl:export '%s%s%s)\n", name, package ? " " : "",
package ? package : "");
}
}
void CFFI::emit_inline(Node *n, String *name) {