aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/utils/make_driver_tab
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-09-13 18:48:18 +0200
committerSverker Eriksson <[email protected]>2013-09-13 18:48:18 +0200
commit439d7e1b81b77e3930d81a6ea9bbadb3cff30fa4 (patch)
tree4747ad5bee962914719ebae5d70073c263c3d097 /erts/emulator/utils/make_driver_tab
parent43b1f1755b1ca9003d88655bfebe5ca9e46cfbf6 (diff)
downloadotp-439d7e1b81b77e3930d81a6ea9bbadb3cff30fa4.tar.gz
otp-439d7e1b81b77e3930d81a6ea9bbadb3cff30fa4.tar.bz2
otp-439d7e1b81b77e3930d81a6ea9bbadb3cff30fa4.zip
erts: Fix loading of NIF library with unicode in path
Diffstat (limited to 'erts/emulator/utils/make_driver_tab')
-rwxr-xr-xerts/emulator/utils/make_driver_tab18
1 files changed, 9 insertions, 9 deletions
diff --git a/erts/emulator/utils/make_driver_tab b/erts/emulator/utils/make_driver_tab
index 0e6793d2af..5c68143d58 100755
--- a/erts/emulator/utils/make_driver_tab
+++ b/erts/emulator/utils/make_driver_tab
@@ -137,19 +137,19 @@ foreach (@nifs) {
print " {NULL,NULL}\n};\n";
print <<EOF;
-ErtsStaticNifInitFPtr erts_static_nif_get_nif_init(const char *name) {
- int i;
- for (i = 0; static_nif_tab[i].nif_name != NULL; i++)
- if (strcmp(name,static_nif_tab[i].nif_name) == 0)
- return static_nif_tab[i].nif_init;
+ErtsStaticNifInitFPtr erts_static_nif_get_nif_init(const char *name, int len) {
+ ErtsStaticNifEntry* p;
+ for (p = static_nif_tab; p->nif_name != NULL; p++)
+ if (strncmp(p->nif_name, name, len) == 0 && p->nif_name[len] == 0)
+ return p->nif_init;
return NULL;
}
int erts_is_static_nif(void *handle) {
- int i;
- for (i = 0; static_nif_tab[i].nif_name != NULL; i++)
- if (((void*)static_nif_tab[i].nif_init) == handle)
- return 1;
+ ErtsStaticNifEntry* p;
+ for (p = static_nif_tab; p->nif_name != NULL; p++)
+ if (((void*)p->nif_init) == handle)
+ return 1;
return 0;
}