Skip to content

Commit 754d398

Browse files
committed
Move v8js_commonjs.cc forward declarations in .h file
1 parent 8c5716f commit 754d398

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

v8js_commonjs.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extern "C" {
2222

2323
#include "php_v8js_macros.h"
2424

25-
void v8js_commonjs_split_terms(char *identifier, std::vector<char *> &terms)
25+
static void v8js_commonjs_split_terms(char *identifier, std::vector<char *> &terms)
2626
{
2727
char *term = (char *)malloc(PATH_MAX), *ptr = term;
2828

v8js_commonjs.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
+----------------------------------------------------------------------+
3+
| PHP Version 5 |
4+
+----------------------------------------------------------------------+
5+
| Copyright (c) 1997-2015 The PHP Group |
6+
+----------------------------------------------------------------------+
7+
| http://www.opensource.org/licenses/mit-license.php MIT License |
8+
+----------------------------------------------------------------------+
9+
| Author: Stefan Siegl <stesie@brokenpipe.de> |
10+
+----------------------------------------------------------------------+
11+
*/
12+
13+
#ifndef V8JS_COMMONJS_H
14+
#define V8JS_COMMONJS_H
15+
16+
void v8js_commonjs_normalise_identifier(char *base, char *identifier, char *normalised_path, char *module_name);
17+
18+
#endif /* V8JS_COMMONJS_H */

v8js_methods.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@
1616
#endif
1717

1818
#include "php_v8js_macros.h"
19+
#include "v8js_commonjs.h"
1920

2021
extern "C" {
2122
#include "zend_exceptions.h"
2223
}
2324

24-
/* Forward declarations */
25-
void v8js_commonjs_normalise_identifier(char *base, char *identifier, char *normalised_path, char *module_name);
26-
2725
/* global.exit - terminate execution */
2826
V8JS_METHOD(exit) /* {{{ */
2927
{

0 commit comments

Comments
 (0)