Skip to content

Commit

Permalink
header: define public API functions as extern c
Browse files Browse the repository at this point in the history
Prior to this change linker errors would occur if curl_easy_header or
curl_easy_nextheader was called from a C++ unit.

Bug: #9424 (comment)
Reported-by: Andrew Lambert

Closes #9446
  • Loading branch information
jay committed Sep 8, 2022
1 parent eafc2b1 commit 9c822a9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/curl/header.h
Expand Up @@ -24,6 +24,10 @@
*
***************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

struct curl_header {
char *name; /* this might not use the same case */
char *value;
Expand Down Expand Up @@ -63,4 +67,8 @@ CURL_EXTERN struct curl_header *curl_easy_nextheader(CURL *easy,
int request,
struct curl_header *prev);

#ifdef __cplusplus
} /* end of extern "C" */
#endif

#endif /* CURLINC_HEADER_H */

0 comments on commit 9c822a9

Please sign in to comment.