Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
node: fix namespacing issue in ev-emul.h
Browse files Browse the repository at this point in the history
Always use C linkage, prevent accidental name mangling.
  • Loading branch information
bnoordhuis committed Jun 19, 2012
1 parent 3f687db commit 067be2b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/ev-emul.h
Expand Up @@ -30,6 +30,10 @@
#include <stdint.h>
#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

#undef ev_init
#undef ev_set_cb
#undef ev_set_priority
Expand Down Expand Up @@ -248,4 +252,8 @@ inline static void __ev_unref(void) {
#undef __uv_container_of
#undef __uv_warn_of

#ifdef __cplusplus
}
#endif

#endif /* NODE_EV_EMUL_H_ */
3 changes: 2 additions & 1 deletion src/node.h
Expand Up @@ -274,10 +274,11 @@ MakeCallback(const v8::Handle<v8::Object> object,
int argc,
v8::Handle<v8::Value> argv[]);

} // namespace node

#if !defined(NODE_WANT_INTERNALS) && !defined(_WIN32)
# include "ev-emul.h"
# include "eio-emul.h"
#endif

} // namespace node
#endif // SRC_NODE_H_

0 comments on commit 067be2b

Please sign in to comment.