Windows compilation patch from pajoye

This commit is contained in:
Bryan Davis
2011-02-22 05:33:30 +00:00
parent 284d78754e
commit 9df5e76164
3 changed files with 10 additions and 10 deletions

View File

@@ -1,3 +1,2 @@
yaml
Bryan Davis [bpd] <bpd@keynetics.com> (lead)
Ryusuke Sekiyama [rsky] <rsky0711@gmail.com> (lead)
Bryan Davis, Ryusuke Sekiyama

View File

@@ -1,13 +1,13 @@
// $Id$
// vim:ft=javascript
ARG_WITH('yaml', 'The YAML parser and emitter PHP extension', 'no');
ARG_WITH("yaml", "The YAML parser and emitter PHP extension", "no");
if (PHP_YAML != 'no') {
if (CHECK_LIB('yaml.lib', 'yaml', PHP_YAML) && CHECK_HEADER_ADD_INCLUDE('yaml.h', 'CFLAGS_YAML')) {
AC_DEFINE('HAVE_YAML', 1, 'Yaml support');
EXTENSION('yaml', 'yaml.c parse.c emit.c detect.c');
if (PHP_YAML != "no") {
if (CHECK_LIB("libyaml_a.lib;libyaml.lib", "yaml", PHP_YAML) && CHECK_HEADER_ADD_INCLUDE("yaml.h", "CFLAGS_YAML")) {
AC_DEFINE("HAVE_YAML", 1, "Yaml support");
EXTENSION("yaml", "yaml.c parse.c emit.c detect.c");
} else {
WARNING('yaml not enabled; library or header not found');
WARNING("yaml not enabled; library or header not found");
}
}

View File

@@ -619,6 +619,7 @@ apply_filter(zval **zpp, yaml_event_t event, HashTable *callbacks TSRMLS_DC)
/* find and apply the filter function */
if (SUCCESS == zend_hash_find(
callbacks, tag, strlen(tag) + 1, (void **) &callback)) {
int callback_result;
zval **argv[] = { zpp, NULL, NULL };
zval *arg2 = { 0 };
zval *arg3 = { 0 };
@@ -632,8 +633,8 @@ apply_filter(zval **zpp, yaml_event_t event, HashTable *callbacks TSRMLS_DC)
ZVAL_LONG(arg3, 0);
argv[2] = &arg3;
// call the user function
int callback_result = call_user_function_ex(EG(function_table), NULL,
/* call the user function */
callback_result = call_user_function_ex(EG(function_table), NULL,
*callback, &retval, 3, argv, 0, NULL TSRMLS_CC);
zval_ptr_dtor(&arg2);
zval_ptr_dtor(&arg3);