From c1fad12bdb6fa89c6cb546326289761d9fc4aede Mon Sep 17 00:00:00 2001 From: David Xu Date: Wed, 5 Aug 2015 21:54:51 -0400 Subject: [PATCH] Extend the export feature in the CFFI module to support exporting to a particular package. --- CHANGES.current | 4 ++++ Source/Modules/cffi.cxx | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES.current b/CHANGES.current index c0694f657..b78865184 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -4,3 +4,7 @@ See the RELEASENOTES file for a summary of changes in each release. Version 3.0.8 (in progress) =========================== + +2015-08-05: lyze + [CFFI] Extend the "export" feature in the CFFI module to support + exporting to a specified package. diff --git a/Source/Modules/cffi.cxx b/Source/Modules/cffi.cxx index 8f718e653..39a1ac763 100644 --- a/Source/Modules/cffi.cxx +++ b/Source/Modules/cffi.cxx @@ -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) {