summaryrefslogtreecommitdiff
path: root/src/dynlib.h
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2017-06-04 19:05:46 +0200
committerPhilipp Stephani <phst@google.com>2017-06-04 19:50:50 +0200
commit366e25a6d1caa30d8d336ce556f90f9ee46ca531 (patch)
treecb9f9e423e07fa4c122ae3ddb86b2de9230103ec /src/dynlib.h
parent045d21c20a60e2c336568516d620d6f98ca3642d (diff)
downloademacs-366e25a6d1caa30d8d336ce556f90f9ee46ca531.tar.gz
Simplify interface of dynlib_attr.
Instead of returning bool, set the argument pointers to NULL if the information is not available. * src/dynlib.c (dynlib_addr): Don't return bool.
Diffstat (limited to 'src/dynlib.h')
-rw-r--r--src/dynlib.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dynlib.h b/src/dynlib.h
index 5ccec11bc79..6246c6a6642 100644
--- a/src/dynlib.h
+++ b/src/dynlib.h
@@ -27,8 +27,11 @@ dynlib_handle_ptr dynlib_open (const char *path);
void *dynlib_sym (dynlib_handle_ptr h, const char *sym);
typedef struct dynlib_function_ptr_nonce *(*dynlib_function_ptr) (void);
dynlib_function_ptr dynlib_func (dynlib_handle_ptr h, const char *sym);
-bool dynlib_addr (void *ptr, const char **path, const char **sym);
const char *dynlib_error (void);
int dynlib_close (dynlib_handle_ptr h);
+/* Sets *FILE to the file name from which PTR was loaded, and *SYM to
+ its symbol name. If the file or symbol name could not be
+ determined, set the corresponding argument to NULL. */
+void dynlib_addr (void *ptr, const char **file, const char **sym);
#endif /* DYNLIB_H */