cvs: php4 /main main.c
| From: | Zeev Suraski | Date: | Wed, 09 Aug 2000 19:23:53 +0000 |
| Subject: | cvs: php4 /main main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1121@lists.php.net to get a copy of this message | ||
zeev Wed Aug 9 12:23:53 2000 EDT
Modified files:
/php4/main main.c
Log:
Update to be consistent with the new Zend API
Index: php4/main/main.c
diff -u php4/main/main.c:1.289 php4/main/main.c:1.290
--- php4/main/main.c:1.289 Sun Aug 6 14:42:54 2000
+++ php4/main/main.c Wed Aug 9 12:23:53 2000
@@ -19,7 +19,7 @@
*/
-/* $Id: main.c,v 1.289 2000/08/06 21:42:54 zeev Exp $ */
+/* $Id: main.c,v 1.290 2000/08/09 19:23:53 zeev Exp $ */
#include <stdio.h>
@@ -1162,16 +1162,14 @@
append_file_p = &append_file;
} else {
append_file_p = NULL;
- }
- EG(main_op_array) = zend_compile_files(ZEND_REQUIRE CLS_CC, 3, prepend_file_p, primary_file,
append_file_p);
- if (EG(main_op_array)) {
- EG(active_op_array) = EG(main_op_array);
- zend_execute(EG(main_op_array) ELS_CC);
}
+ zend_execute_scripts(ZEND_REQUIRE CLS_CC ELS_CC, 3, prepend_file_p, primary_file, append_file_p);
}
PHPAPI int php_lint_script(zend_file_handle *file CLS_DC ELS_DC PLS_DC)
{
+ zend_op_array *op_array;
+ int retval;
SLS_FETCH();
php_hash_environment(ELS_C SLS_CC PLS_CC);
@@ -1187,9 +1185,11 @@
UpdateIniFromRegistry(file->filename);
#endif
- EG(main_op_array) = zend_compile_files(ZEND_REQUIRE CLS_CC, 1, file);
+ op_array = zend_compile_file(file CLS_CC);
+ retval = (op_array?SUCCESS:FAILURE);
+ destroy_op_array(op_array);
- return (EG(main_op_array)) ? SUCCESS : FAILURE;
+ return retval;
}
#ifdef PHP_WIN32