Skip to content

Remove all *_EXTERN_C() in C source files #7054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Zend/zend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,6 @@ ZEND_COLD void zenderror(const char *error) /* {{{ */
}
/* }}} */

BEGIN_EXTERN_C()
ZEND_API ZEND_COLD ZEND_NORETURN void _zend_bailout(const char *filename, uint32_t lineno) /* {{{ */
{

Expand All @@ -1205,7 +1204,6 @@ ZEND_API ZEND_COLD ZEND_NORETURN void _zend_bailout(const char *filename, uint32
LONGJMP(*EG(bailout), FAILURE);
}
/* }}} */
END_EXTERN_C()

ZEND_API void zend_append_version_info(const zend_extension *extension) /* {{{ */
{
Expand Down Expand Up @@ -1298,15 +1296,13 @@ ZEND_API void zend_deactivate(void) /* {{{ */
}
/* }}} */

BEGIN_EXTERN_C()
ZEND_API void zend_message_dispatcher(zend_long message, const void *data) /* {{{ */
{
if (zend_message_dispatcher_p) {
zend_message_dispatcher_p(message, data);
}
}
/* }}} */
END_EXTERN_C()

ZEND_API zval *zend_get_configuration_directive(zend_string *name) /* {{{ */
{
Expand Down
3 changes: 0 additions & 3 deletions Zend/zend_language_scanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ do { \
#define ZEND_IS_OCT(c) ((c)>='0' && (c)<='7')
#define ZEND_IS_HEX(c) (((c)>='0' && (c)<='9') || ((c)>='a' && (c)<='f') || ((c)>='A' && (c)<='F'))

BEGIN_EXTERN_C()

static void strip_underscores(char *str, size_t *len)
{
Expand Down Expand Up @@ -587,7 +586,6 @@ ZEND_API zend_result open_file_for_scanning(zend_file_handle *file_handle)
CG(increment_lineno) = 0;
return SUCCESS;
}
END_EXTERN_C()

static zend_op_array *zend_compile(int type)
{
Expand Down Expand Up @@ -811,7 +809,6 @@ zend_op_array *compile_string(zend_string *source_string, const char *filename)
}


BEGIN_EXTERN_C()
zend_result highlight_file(const char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini)
{
zend_lex_state original_lex_state;
Expand Down
14 changes: 0 additions & 14 deletions Zend/zend_strtod.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,6 @@ static double private_mem[PRIVATE_mem], *pmem_next = private_mem;
#include "math.h"
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef CONST
#ifdef KR_headers
#define CONST /* blank */
Expand Down Expand Up @@ -528,12 +524,6 @@ BCinfo { int dp0, dp1, dplen, dsign, e0, inexact, nd, nd0, rounding, scale, uflc

#define Kmax 7

#ifdef __cplusplus
extern "C" double strtod(const char *s00, char **se);
extern "C" char *dtoa(double d, int mode, int ndigits,
int *decpt, int *sign, char **rve);
#endif

struct
Bigint {
struct Bigint *next;
Expand Down Expand Up @@ -4553,7 +4543,3 @@ static void free_p5s(void)
}
FREE_DTOA_LOCK(1)
}

#ifdef __cplusplus
}
#endif
2 changes: 0 additions & 2 deletions ext/phar/dirstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
#include "phar_internal.h"
#include "dirstream.h"

BEGIN_EXTERN_C()
void phar_dostat(phar_archive_data *phar, phar_entry_info *data, php_stream_statbuf *ssb, bool is_dir);
END_EXTERN_C()

const php_stream_ops phar_dir_ops = {
phar_dir_write, /* write */
Expand Down
8 changes: 0 additions & 8 deletions win32/readdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
* The DIR typedef is not compatible with Unix.
**********************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

DIR *opendir(const char *dir)
{/*{{{*/
DIR *dp;
Expand Down Expand Up @@ -196,7 +192,3 @@ int rewinddir(DIR *dp)

return 0;
}/*}}}*/

#ifdef __cplusplus
}
#endif