Skip to content

Commit

Permalink
Add extern "C" to allow header inclusion from C++
Browse files Browse the repository at this point in the history
(fix #15)
  • Loading branch information
kubo committed Mar 15, 2020
1 parent 40ea497 commit 85e5523
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/funchook.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
#ifndef FUNCHOOK_H
#define FUNCHOOK_H 1

#ifdef __cplusplus
extern "C" {
#endif

/*
* Only functions with FUNCHOOK_EXPORT are visible from outside of funchook.dll
* or libfunchook.so. Others are invisible.
Expand Down Expand Up @@ -119,4 +123,8 @@ FUNCHOOK_EXPORT const char *funchook_error_message(const funchook_t *funchook);
*/
FUNCHOOK_EXPORT int funchook_set_debug_file(const char *name);

#ifdef __cplusplus
} // extern "C"
#endif

#endif

0 comments on commit 85e5523

Please sign in to comment.