/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2013 The PHP Group | +----------------------------------------------------------------------+ | http://www.opensource.org/licenses/mit-license.php MIT License | +----------------------------------------------------------------------+ | Author: Jani Taskinen | | Author: Patrick Reilly | +----------------------------------------------------------------------+ */ #ifndef V8JS_CLASS_H #define V8JS_CLASS_H /* Abbreviate long type names */ typedef v8::Persistent > v8js_tmpl_t; typedef v8::Persistent > v8js_persistent_obj_t; /* Forward declarations */ struct v8js_v8object; struct v8js_accessor_ctx; struct _v8js_script; struct cmp_str { bool operator()(char const *a, char const *b) const { return strcmp(a, b) < 0; } }; /* {{{ Context container */ struct v8js_ctx { zend_object std; v8::Persistent object_name; v8::Persistent context; zend_bool report_uncaught; zval *pending_exception; int in_execution; v8::Isolate *isolate; long time_limit; bool time_limit_hit; long memory_limit; bool memory_limit_hit; v8js_tmpl_t global_template; v8js_tmpl_t array_tmpl; zval *module_loader; std::vector modules_stack; std::vector modules_base; std::map modules_loaded; std::map template_cache; std::map weak_objects; std::map weak_closures; std::map call_impls; std::map method_tmpls; std::list v8js_v8objects; std::vector accessor_list; std::vector script_objects; char *tz; #ifdef ZTS void ***zts_ctx; #endif }; /* }}} */ #ifdef ZTS # define V8JS_TSRMLS_FETCH() TSRMLS_FETCH_FROM_CTX(((v8js_ctx *) isolate->GetData(0))->zts_ctx); #else # define V8JS_TSRMLS_FETCH() #endif PHP_MINIT_FUNCTION(v8js_class); #endif /* V8JS_CLASS_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: noet sw=4 ts=4 fdm=marker * vim<600: noet sw=4 ts=4 */