Skip to content

Commit 6b6d062

Browse files
authored
Merge pull request #180 from herwinw/GETPROCADDRESS
Remove GETPROCADDRESS macro
2 parents 4b33f17 + 71664b7 commit 6b6d062

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

jsrc/jconsole.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#define _isatty isatty
88
#define _fileno fileno
99
#include <dlfcn.h>
10-
#define GETPROCADDRESS(h, p) dlsym(h, p)
1110
#include <signal.h>
1211
#include <stdint.h>
1312
#include <locale.h>
@@ -65,11 +64,11 @@ readlineinit() {
6564
#endif
6665
return 0;
6766
}
68-
add_history = (ADD_HISTORY)GETPROCADDRESS(hreadline, "add_history");
69-
read_history = (READ_HISTORY)GETPROCADDRESS(hreadline, "read_history");
70-
write_history = (WRITE_HISTORY)GETPROCADDRESS(hreadline, "write_history");
71-
readline = (PREADLINE)GETPROCADDRESS(hreadline, "readline");
72-
using_history = (USING_HISTORY)GETPROCADDRESS(hreadline, "using_history");
67+
add_history = (ADD_HISTORY)dlsym(hreadline, "add_history");
68+
read_history = (READ_HISTORY)dlsym(hreadline, "read_history");
69+
write_history = (WRITE_HISTORY)dlsym(hreadline, "write_history");
70+
readline = (PREADLINE)dlsym(hreadline, "readline");
71+
using_history = (USING_HISTORY)dlsym(hreadline, "using_history");
7372
return 1;
7473
}
7574

0 commit comments

Comments
 (0)