php_vm 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/php_vm/php_vm.c +9 -3
- metadata +2 -2
data/ext/php_vm/php_vm.c
CHANGED
@@ -48,6 +48,12 @@ static void php_embed_error_handler(char *message)
|
|
48
48
|
}
|
49
49
|
}
|
50
50
|
|
51
|
+
static void php_vm_catch_exception(zval *ex TSRMLS_DC)
|
52
|
+
{
|
53
|
+
VALUE exception = zval_to_value(ex);
|
54
|
+
rb_exc_raise(exception);
|
55
|
+
}
|
56
|
+
|
51
57
|
|
52
58
|
// PHP
|
53
59
|
|
@@ -280,8 +286,6 @@ int call_php_method(zend_class_entry *ce, zval *obj, zend_function *mptr, int ar
|
|
280
286
|
// call info
|
281
287
|
zend_fcall_info fci;
|
282
288
|
zend_fcall_info_cache fcc;
|
283
|
-
zval *return_value;
|
284
|
-
ALLOC_INIT_ZVAL(return_value);
|
285
289
|
|
286
290
|
fci.size = sizeof(fci);
|
287
291
|
fci.function_table = NULL;
|
@@ -1055,6 +1059,8 @@ void Init_php_vm()
|
|
1055
1059
|
php_vm_module_init();
|
1056
1060
|
atexit(php_vm_module_exit);
|
1057
1061
|
|
1062
|
+
zend_throw_exception_hook = php_vm_catch_exception;
|
1063
|
+
|
1058
1064
|
// ini
|
1059
1065
|
zend_try {
|
1060
1066
|
zend_alter_ini_entry("display_errors", sizeof("display_errors"), "0", sizeof("0")-1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
|
@@ -1079,7 +1085,7 @@ void Init_php_vm()
|
|
1079
1085
|
rb_define_singleton_method(rb_mPHPVM, "get_class", rb_php_vm_get_class, 1);
|
1080
1086
|
rb_define_singleton_method(rb_mPHPVM, "define_global", rb_php_vm_define_global, 0);
|
1081
1087
|
|
1082
|
-
rb_define_const(rb_mPHPVM, "VERSION", rb_str_new2("1.3.
|
1088
|
+
rb_define_const(rb_mPHPVM, "VERSION", rb_str_new2("1.3.2"));
|
1083
1089
|
|
1084
1090
|
rb_cv_set(rb_mPHPVM, "@@output_handler", Qnil);
|
1085
1091
|
rb_cv_set(rb_mPHPVM, "@@error_handler", Qnil);
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: php_vm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-30 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: php_vm is a native bridge between Ruby and PHP.
|
15
15
|
email:
|