Skip to content

Instantly share code, notes, and snippets.

@martinsik
Created August 11, 2012 07:39
Show Gist options
  • Save martinsik/3322159 to your computer and use it in GitHub Desktop.
Save martinsik/3322159 to your computer and use it in GitHub Desktop.
Patch file for APD 1.0.1 that fixes bugs for PHP 5.4
--- php_apd.c.orig 2004-09-28 05:25:59.000000000 +0200
+++ php_apd.c 2012-08-11 10:59:29.000000000 +0200
@@ -70,7 +70,7 @@
/* List of exported functions. */
-function_entry apd_functions[] = {
+zend_function_entry apd_functions[] = {
PHP_FE(override_function, NULL)
PHP_FE(rename_function, NULL)
PHP_FE(apd_set_pprof_trace, NULL)
@@ -321,7 +321,11 @@
}
}
else {
+#if ZEND_EXTENSION_API_NO >= 220100525
+ switch (execd->opline->extended_value) {
+#else
switch (execd->opline->op2.u.constant.value.lval) {
+#endif
case ZEND_EVAL:
funcname = estrdup("eval");
break;
@@ -964,7 +968,7 @@
int apd_zend_startup(zend_extension *extension)
{
TSRMLS_FETCH();
- CG(extended_info) = 1; /* XXX: this is ridiculous */
+ CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;
return zend_startup_module(&apd_module_entry);
}
--- php_apd.h.orig 2004-09-28 05:25:42.000000000 +0200
+++ php_apd.h 2012-08-11 11:00:26.000000000 +0200
@@ -89,7 +89,7 @@
extern zend_module_entry apd_module_entry;
#define apd_module_ptr &apd_module_entry
-#define APD_VERSION "0.9"
+#define APD_VERSION "1.0.1"
#define FUNCTION_TRACE 1
#define ARGS_TRACE 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment