git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Update foreign macros
f233ff1Andy Arvanitis
runtime/purescript.h+6−2
@@ -134,7 +134,11 @@ namespace purescript {
134
134
135} // namespace purescript
135} // namespace purescript
136
136
137−#define FOREIGN_EXPORTS(NS) namespace NS { using namespace purescript; auto _foreign_() -> dict_t&; static const auto& NS ## _foreign_init = []() { dict_t& foreign = _foreign_();
137+#define FOREIGN_BEGIN(NS) namespace NS {\
138−#define END_FOREIGN_EXPORTS return foreign; }(); }
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; }(); }
139
143
140#endif // purescript_H
144#endif // purescript_H