0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-09-19 16:35:19 +00:00

Reorder includes for Visual Studio 2015, closes #194

C++ headers need to go first, since PHP headers redefine
"inline" which causes trouble with the C++ header files.
This commit is contained in:
Stefan Siegl 2016-01-06 09:01:35 +00:00
parent 5fd9f3d000
commit 98205461be
11 changed files with 57 additions and 66 deletions

View File

@ -18,6 +18,15 @@
#define _GLIBCXX_USE_NANOSLEEP 1 #define _GLIBCXX_USE_NANOSLEEP 1
#endif #endif
#include <chrono>
#include <deque>
#include <thread>
#include <map>
#include <list>
#include <vector>
#include <mutex>
extern "C" { extern "C" {
#include "php.h" #include "php.h"
#include "php_v8js.h" #include "php_v8js.h"
@ -31,15 +40,6 @@ extern "C" {
#include <v8.h> #include <v8.h>
#include <chrono>
#include <deque>
#include <thread>
#include <map>
#include <list>
#include <vector>
#include <mutex>
#include "v8js_class.h" #include "v8js_class.h"
#include "v8js_v8.h" #include "v8js_v8.h"

View File

@ -14,6 +14,10 @@
#include "config.h" #include "config.h"
#endif #endif
#include "php_v8js_macros.h"
#include "v8js_array_access.h"
#include "v8js_object_export.h"
extern "C" { extern "C" {
#include "php.h" #include "php.h"
#include "ext/date/php_date.h" #include "ext/date/php_date.h"
@ -22,11 +26,6 @@ extern "C" {
#include "zend_closures.h" #include "zend_closures.h"
} }
#include "php_v8js_macros.h"
#include "v8js_array_access.h"
#include "v8js_object_export.h"
static zval v8js_array_access_dispatch(zend_object *object, const char *method_name, int param_count, static zval v8js_array_access_dispatch(zend_object *object, const char *method_name, int param_count,
uint32_t index, zval zvalue TSRMLS_DC) /* {{{ */ uint32_t index, zval zvalue TSRMLS_DC) /* {{{ */
{ {

View File

@ -16,6 +16,15 @@
#include "config.h" #include "config.h"
#endif #endif
#include <functional>
#include <algorithm>
#include "php_v8js_macros.h"
#include "v8js_v8.h"
#include "v8js_exceptions.h"
#include "v8js_v8object_class.h"
#include "v8js_timer.h"
extern "C" { extern "C" {
#include "php.h" #include "php.h"
#include "ext/date/php_date.h" #include "ext/date/php_date.h"
@ -26,15 +35,6 @@ extern "C" {
#include "zend_exceptions.h" #include "zend_exceptions.h"
} }
#include "php_v8js_macros.h"
#include "v8js_v8.h"
#include "v8js_exceptions.h"
#include "v8js_v8object_class.h"
#include "v8js_timer.h"
#include <functional>
#include <algorithm>
#define PHP_V8JS_SCRIPT_RES_NAME "V8Js script" #define PHP_V8JS_SCRIPT_RES_NAME "V8Js script"
/* {{{ Class Entries */ /* {{{ Class Entries */

View File

@ -15,13 +15,13 @@
#include "config.h" #include "config.h"
#endif #endif
#include "php_v8js_macros.h"
extern "C" { extern "C" {
#include "php.h" #include "php.h"
#include "zend_exceptions.h" #include "zend_exceptions.h"
} }
#include "php_v8js_macros.h"
static void v8js_commonjs_split_terms(const char *identifier, std::vector<char *> &terms) static void v8js_commonjs_split_terms(const char *identifier, std::vector<char *> &terms)
{ {
char *term = (char *) emalloc(PATH_MAX), *ptr = term; char *term = (char *) emalloc(PATH_MAX), *ptr = term;

View File

@ -15,6 +15,14 @@
#include "config.h" #include "config.h"
#endif #endif
#include <stdexcept>
#include <limits>
#include "php_v8js_macros.h"
#include "v8js_object_export.h"
#include "v8js_v8object_class.h"
#include "v8js_v8.h"
extern "C" { extern "C" {
#include "php.h" #include "php.h"
#include "ext/date/php_date.h" #include "ext/date/php_date.h"
@ -23,14 +31,6 @@ extern "C" {
#include "zend_closures.h" #include "zend_closures.h"
} }
#include "php_v8js_macros.h"
#include "v8js_object_export.h"
#include "v8js_v8object_class.h"
#include "v8js_v8.h"
#include <stdexcept>
#include <limits>
static int v8js_is_assoc_array(HashTable *myht TSRMLS_DC) /* {{{ */ static int v8js_is_assoc_array(HashTable *myht TSRMLS_DC) /* {{{ */
{ {
zend_string *key; zend_string *key;

View File

@ -16,8 +16,9 @@
#include "config.h" #include "config.h"
#endif #endif
#include "php_v8js_macros.h"
extern "C" { extern "C" {
#include "php.h"
#include "ext/date/php_date.h" #include "ext/date/php_date.h"
#include "ext/standard/php_string.h" #include "ext/standard/php_string.h"
#include "zend_interfaces.h" #include "zend_interfaces.h"
@ -26,9 +27,6 @@ extern "C" {
#include "zend_exceptions.h" #include "zend_exceptions.h"
} }
#include "php_v8js_macros.h"
/* {{{ Class Entries */ /* {{{ Class Entries */
zend_class_entry *php_ce_v8js_exception; zend_class_entry *php_ce_v8js_exception;
zend_class_entry *php_ce_v8js_script_exception; zend_class_entry *php_ce_v8js_script_exception;

View File

@ -15,8 +15,12 @@
#include "config.h" #include "config.h"
#endif #endif
#include "php_v8js_macros.h"
#include "v8js_array_access.h"
#include "v8js_object_export.h"
#include "v8js_v8object_class.h"
extern "C" { extern "C" {
#include "php.h"
#include "ext/date/php_date.h" #include "ext/date/php_date.h"
#include "ext/standard/php_string.h" #include "ext/standard/php_string.h"
#include "zend_interfaces.h" #include "zend_interfaces.h"
@ -24,11 +28,6 @@ extern "C" {
#include "zend_exceptions.h" #include "zend_exceptions.h"
} }
#include "php_v8js_macros.h"
#include "v8js_array_access.h"
#include "v8js_object_export.h"
#include "v8js_v8object_class.h"
static void v8js_weak_object_callback(const v8::WeakCallbackData<v8::Object, zend_object> &data); static void v8js_weak_object_callback(const v8::WeakCallbackData<v8::Object, zend_object> &data);
/* Callback for PHP methods and functions */ /* Callback for PHP methods and functions */

View File

@ -15,8 +15,14 @@
#include "config.h" #include "config.h"
#endif #endif
#include <concrt.h>
#include "php_v8js_macros.h"
#include "v8js_v8.h"
#include "v8js_exceptions.h"
#include "v8js_timer.h"
extern "C" { extern "C" {
#include "php.h"
#include "ext/date/php_date.h" #include "ext/date/php_date.h"
#include "ext/standard/php_string.h" #include "ext/standard/php_string.h"
#include "zend_interfaces.h" #include "zend_interfaces.h"
@ -25,11 +31,6 @@ extern "C" {
#include "zend_exceptions.h" #include "zend_exceptions.h"
} }
#include "php_v8js_macros.h"
#include "v8js_v8.h"
#include "v8js_exceptions.h"
#include "v8js_timer.h"
static void v8js_timer_interrupt_handler(v8::Isolate *isolate, void *data) { /* {{{ */ static void v8js_timer_interrupt_handler(v8::Isolate *isolate, void *data) { /* {{{ */
zend_v8js_globals *globals = static_cast<zend_v8js_globals *>(data); zend_v8js_globals *globals = static_cast<zend_v8js_globals *>(data);

View File

@ -16,8 +16,12 @@
#include "config.h" #include "config.h"
#endif #endif
#include "php_v8js_macros.h"
#include "v8js_v8.h"
#include "v8js_timer.h"
#include "v8js_exceptions.h"
extern "C" { extern "C" {
#include "php.h"
#include "ext/date/php_date.h" #include "ext/date/php_date.h"
#include "ext/standard/php_string.h" #include "ext/standard/php_string.h"
#include "zend_interfaces.h" #include "zend_interfaces.h"
@ -29,11 +33,6 @@ extern "C" {
#include <libplatform/libplatform.h> #include <libplatform/libplatform.h>
#endif #endif
#include "php_v8js_macros.h"
#include "v8js_v8.h"
#include "v8js_timer.h"
#include "v8js_exceptions.h"
void v8js_v8_init(TSRMLS_D) /* {{{ */ void v8js_v8_init(TSRMLS_D) /* {{{ */
{ {
/* Run only once; thread-local test first */ /* Run only once; thread-local test first */

View File

@ -15,8 +15,12 @@
#include "config.h" #include "config.h"
#endif #endif
#include "php_v8js_macros.h"
#include "v8js_exceptions.h"
#include "v8js_v8.h"
#include "v8js_v8object_class.h"
extern "C" { extern "C" {
#include "php.h"
#include "ext/date/php_date.h" #include "ext/date/php_date.h"
#include "ext/standard/php_string.h" #include "ext/standard/php_string.h"
#include "zend_interfaces.h" #include "zend_interfaces.h"
@ -25,11 +29,6 @@ extern "C" {
#include "zend_exceptions.h" #include "zend_exceptions.h"
} }
#include "php_v8js_macros.h"
#include "v8js_exceptions.h"
#include "v8js_v8.h"
#include "v8js_v8object_class.h"
/* {{{ Class Entries */ /* {{{ Class Entries */
zend_class_entry *php_ce_v8object; zend_class_entry *php_ce_v8object;
zend_class_entry *php_ce_v8function; zend_class_entry *php_ce_v8function;

View File

@ -17,13 +17,9 @@
#include "config.h" #include "config.h"
#endif #endif
extern "C" { #include <string>
#include "php.h"
}
#include "php_v8js_macros.h" #include "php_v8js_macros.h"
#include <v8.h>
#include <string>
static void v8js_fetch_php_variable(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) /* {{{ */ static void v8js_fetch_php_variable(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) /* {{{ */
{ {