mirror of
https://github.com/php/pecl-file_formats-yaml.git
synced 2026-03-23 23:02:08 +01:00
Windows compilation patch from pajoye
This commit is contained in:
3
CREDITS
3
CREDITS
@@ -1,3 +1,2 @@
|
||||
yaml
|
||||
Bryan Davis [bpd] <bpd@keynetics.com> (lead)
|
||||
Ryusuke Sekiyama [rsky] <rsky0711@gmail.com> (lead)
|
||||
Bryan Davis, Ryusuke Sekiyama
|
||||
|
||||
12
config.w32
12
config.w32
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
5
parse.c
5
parse.c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user