git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Update foreign macros
commitf233ff1856edaf3453fd79425b0d66d385d3a4e3 authorAndy Arvanitis <andyarvanitis@gmail.com> dateSat 11 Aug 2018, 11:06 (8 years ago) parent3174eeb
1 file changed+6−2
runtime/purescript.h+6−2
runtime/purescript.h+6−2
@@ -134,7 +134,11 @@ namespace purescript {
134134
135135} // namespace purescript
136136
137−#define FOREIGN_EXPORTS(NS) namespace NS { using namespace purescript; auto _foreign_() -> dict_t&; static const auto& NS ## _foreign_init = []() { dict_t& foreign = _foreign_();
138−#define END_FOREIGN_EXPORTS return foreign; }(); }
137+#define FOREIGN_BEGIN(NS) namespace NS {\
138+ using namespace purescript;\
139+ auto _foreign_() -> dict_t&;\
140+ static const auto& NS ## _foreign_init = []() {\
141+ dict_t& exports = _foreign_();
142+#define FOREIGN_END return exports; }(); }
139143
140144#endif // purescript_H