Skip to content

Commit 9066d69

Browse files
authored
Remove all *_EXTERN_C() in C source files (#7054)
1 parent 3939c9b commit 9066d69

File tree

5 files changed

+0
-31
lines changed

5 files changed

+0
-31
lines changed

Zend/zend.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,6 @@ ZEND_COLD void zenderror(const char *error) /* {{{ */
11891189
}
11901190
/* }}} */
11911191

1192-
BEGIN_EXTERN_C()
11931192
ZEND_API ZEND_COLD ZEND_NORETURN void _zend_bailout(const char *filename, uint32_t lineno) /* {{{ */
11941193
{
11951194

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

12101208
ZEND_API void zend_append_version_info(const zend_extension *extension) /* {{{ */
12111209
{
@@ -1298,15 +1296,13 @@ ZEND_API void zend_deactivate(void) /* {{{ */
12981296
}
12991297
/* }}} */
13001298

1301-
BEGIN_EXTERN_C()
13021299
ZEND_API void zend_message_dispatcher(zend_long message, const void *data) /* {{{ */
13031300
{
13041301
if (zend_message_dispatcher_p) {
13051302
zend_message_dispatcher_p(message, data);
13061303
}
13071304
}
13081305
/* }}} */
1309-
END_EXTERN_C()
13101306

13111307
ZEND_API zval *zend_get_configuration_directive(zend_string *name) /* {{{ */
13121308
{

Zend/zend_language_scanner.l

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ do { \
118118
#define ZEND_IS_OCT(c) ((c)>='0' && (c)<='7')
119119
#define ZEND_IS_HEX(c) (((c)>='0' && (c)<='9') || ((c)>='a' && (c)<='f') || ((c)>='A' && (c)<='F'))
120120

121-
BEGIN_EXTERN_C()
122121

123122
static void strip_underscores(char *str, size_t *len)
124123
{
@@ -587,7 +586,6 @@ ZEND_API zend_result open_file_for_scanning(zend_file_handle *file_handle)
587586
CG(increment_lineno) = 0;
588587
return SUCCESS;
589588
}
590-
END_EXTERN_C()
591589

592590
static zend_op_array *zend_compile(int type)
593591
{
@@ -811,7 +809,6 @@ zend_op_array *compile_string(zend_string *source_string, const char *filename)
811809
}
812810

813811

814-
BEGIN_EXTERN_C()
815812
zend_result highlight_file(const char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini)
816813
{
817814
zend_lex_state original_lex_state;

Zend/zend_strtod.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,6 @@ static double private_mem[PRIVATE_mem], *pmem_next = private_mem;
292292
#include "math.h"
293293
#endif
294294

295-
#ifdef __cplusplus
296-
extern "C" {
297-
#endif
298-
299295
#ifndef CONST
300296
#ifdef KR_headers
301297
#define CONST /* blank */
@@ -528,12 +524,6 @@ BCinfo { int dp0, dp1, dplen, dsign, e0, inexact, nd, nd0, rounding, scale, uflc
528524

529525
#define Kmax 7
530526

531-
#ifdef __cplusplus
532-
extern "C" double strtod(const char *s00, char **se);
533-
extern "C" char *dtoa(double d, int mode, int ndigits,
534-
int *decpt, int *sign, char **rve);
535-
#endif
536-
537527
struct
538528
Bigint {
539529
struct Bigint *next;
@@ -4553,7 +4543,3 @@ static void free_p5s(void)
45534543
}
45544544
FREE_DTOA_LOCK(1)
45554545
}
4556-
4557-
#ifdef __cplusplus
4558-
}
4559-
#endif

ext/phar/dirstream.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
#include "phar_internal.h"
2222
#include "dirstream.h"
2323

24-
BEGIN_EXTERN_C()
2524
void phar_dostat(phar_archive_data *phar, phar_entry_info *data, php_stream_statbuf *ssb, bool is_dir);
26-
END_EXTERN_C()
2725

2826
const php_stream_ops phar_dir_ops = {
2927
phar_dir_write, /* write */

win32/readdir.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@
2121
* The DIR typedef is not compatible with Unix.
2222
**********************************************************************/
2323

24-
#ifdef __cplusplus
25-
extern "C" {
26-
#endif
27-
2824
DIR *opendir(const char *dir)
2925
{/*{{{*/
3026
DIR *dp;
@@ -196,7 +192,3 @@ int rewinddir(DIR *dp)
196192

197193
return 0;
198194
}/*}}}*/
199-
200-
#ifdef __cplusplus
201-
}
202-
#endif

0 commit comments

Comments
 (0)