Last active
August 29, 2015 14:26
-
-
Save ghaiklor/aade1f6bfd3b598bc051 to your computer and use it in GitHub Desktop.
NodeJS method that get builtin native module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct node_module* get_builtin_module(const char* name) { | |
struct node_module* mp; | |
for (mp = modlist_builtin; mp != nullptr; mp = mp->nm_link) { | |
if (strcmp(mp->nm_modname, name) == 0) | |
break; | |
} | |
CHECK(mp == nullptr || (mp->nm_flags & NM_F_BUILTIN) != 0); | |
return (mp); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment