aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/utils
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-03-20 18:55:51 +0100
committerSverker Eriksson <[email protected]>2018-03-20 18:55:51 +0100
commit5b557bccac579291301a7a4d78a3d992b4e9373d (patch)
treeeb2e6c5925bb84e7016468fb37a9a033d0b32952 /erts/emulator/utils
parent902e1df69542e07e7c363f5b599ac1551b8fbb64 (diff)
downloadotp-5b557bccac579291301a7a4d78a3d992b4e9373d.tar.gz
otp-5b557bccac579291301a7a4d78a3d992b4e9373d.tar.bz2
otp-5b557bccac579291301a7a4d78a3d992b4e9373d.zip
erts: Refactor erts_static_nif_get_nif_init
to return pointer to ErtsStaticNifEntry.
Diffstat (limited to 'erts/emulator/utils')
-rwxr-xr-xerts/emulator/utils/make_driver_tab15
1 files changed, 3 insertions, 12 deletions
diff --git a/erts/emulator/utils/make_driver_tab b/erts/emulator/utils/make_driver_tab
index ffb5f58ebf..6f28a21f81 100755
--- a/erts/emulator/utils/make_driver_tab
+++ b/erts/emulator/utils/make_driver_tab
@@ -115,15 +115,6 @@ foreach (@static_drivers) {
print "}\n";
-print <<EOF;
-
-typedef struct ErtsStaticNifEntry_ {
- const char *nif_name;
- ErtsStaticNifInitFPtr nif_init;
-} ErtsStaticNifEntry;
-
-EOF
-
# prototypes
foreach (@static_nifs) {
my $d = ${_};
@@ -137,17 +128,17 @@ print "static ErtsStaticNifEntry static_nif_tab[] =\n{\n";
foreach (@static_nifs) {
my $d = ${_};
$d =~ s/\.debug//; # strip .debug
- print "{\"${_}\",&".$d."_nif_init},\n";
+ print " {\"${_}\",&".$d."_nif_init},\n";
}
print " {NULL,NULL}\n};\n";
print <<EOF;
-ErtsStaticNifInitFPtr erts_static_nif_get_nif_init(const char *name, int len) {
+ErtsStaticNifEntry* 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 p;
return NULL;
}