Browse Source

- Update after api changes

PECL_OPENSSL
Marcus Boerger 20 years ago
parent
commit
77c1b56cd7
  1. 4
      ext/date/php_date.c
  2. 5
      ext/dom/dom_iterators.c
  3. 8
      ext/dom/php_dom.c
  4. 2
      ext/dom/php_dom.h
  5. 6
      ext/mysql/php_mysql.c
  6. 8
      ext/mysqli/mysqli.c
  7. 2
      ext/mysqli/mysqli_driver.c
  8. 6
      ext/pgsql/pgsql.c
  9. 2
      ext/reflection/php_reflection.c
  10. 26
      ext/simplexml/simplexml.c
  11. 16
      ext/soap/soap.c
  12. 91
      ext/sqlite/sqlite.c
  13. 8
      ext/tidy/tidy.c
  14. 74
      ext/xmlwriter/php_xmlwriter.c
  15. 2
      sapi/cli/php_cli.c

4
ext/date/php_date.c

@ -99,8 +99,8 @@ zend_function_entry date_funcs_timezone[] = {
ZEND_NAMED_FE(getName, ZEND_FN(timezone_name_get), NULL)
ZEND_NAMED_FE(getOffset, ZEND_FN(timezone_offset_get), NULL)
ZEND_NAMED_FE(getTransistions, ZEND_FN(timezone_transistions_get), NULL)
ZEND_MALIAS(timezone, listAbbreviations, abbreviations_list, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
ZEND_MALIAS(timezone, listIdentifiers, identifiers_list, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
ZEND_ME_MAPPING(listAbbreviations, timezone_abbreviations_list, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
ZEND_ME_MAPPING(listIdentifiers, timezone_identifiers_list, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
{NULL, NULL, NULL}
};

5
ext/dom/dom_iterators.c

@ -253,7 +253,7 @@ zend_object_iterator_funcs php_dom_iterator_funcs = {
NULL
};
zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object TSRMLS_DC)
zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC)
{
dom_object *intern;
dom_nnodemap_object *objmap;
@ -263,6 +263,9 @@ zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object TS
HashTable *nodeht;
zval **entry;
if (by_ref) {
zend_error(E_ERROR, "An iterator cannot be used with foreach by reference");
}
php_dom_iterator *iterator = emalloc(sizeof(php_dom_iterator));
object->refcount++;

8
ext/dom/php_dom.c

@ -464,11 +464,7 @@ static zend_function_entry dom_functions[] = {
};
static zend_object_handlers* dom_get_obj_handlers(TSRMLS_D) {
if (EG(ze1_compatibility_mode)) {
return &dom_ze1_object_handlers;
} else {
return &dom_object_handlers;
}
return &dom_object_handlers;
}
static zend_module_dep dom_deps[] = {
@ -517,7 +513,7 @@ PHP_MINIT_FUNCTION(dom)
zend_hash_init(&classes, 0, NULL, NULL, 1);
INIT_CLASS_ENTRY(ce, "DOMException", php_dom_domexception_class_functions);
dom_domexception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC);
dom_domexception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
dom_domexception_class_entry->ce_flags |= ZEND_ACC_FINAL;
zend_declare_property_long(dom_domexception_class_entry, "code", sizeof("code")-1, 0, ZEND_ACC_PUBLIC TSRMLS_CC);

2
ext/dom/php_dom.h

@ -109,7 +109,7 @@ void dom_namednode_iter(dom_object *basenode, int ntype, dom_object *intern, xml
xmlNodePtr create_notation(const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID);
xmlNode *php_dom_libxml_hash_iter(xmlHashTable *ht, int index);
xmlNode *php_dom_libxml_notation_iter(xmlHashTable *ht, int index);
zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object TSRMLS_DC);
zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC);
#define REGISTER_DOM_CLASS(ce, name, parent_ce, funcs, entry) \
INIT_CLASS_ENTRY(ce, name, funcs); \

6
ext/mysql/php_mysql.c

@ -2043,7 +2043,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
* single value is an array. Also we'd have to make that one
* argument passed by reference.
*/
zend_throw_exception(zend_exception_get_default(), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
zend_throw_exception(zend_exception_get_default(TSRMLS_C), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
return;
}
} else {
@ -2058,7 +2058,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
fcc.object_pp = &return_value;
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
} else {
if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
@ -2068,7 +2068,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
efree(fci.params);
}
} else if (ctor_params) {
zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
}
}
#endif

8
ext/mysqli/mysqli.c

@ -322,7 +322,7 @@ static union _zend_function *php_mysqli_constructor_get(zval *object TSRMLS_DC)
} else if (obj->zo.ce == mysqli_driver_class_entry) {
f.handler = ZEND_FN(mysqli_driver_construct);
} else if (obj->zo.ce == mysqli_warning_class_entry) {
f.handler = ZEND_FN(mysqli_warning___construct);
f.handler = ZEND_MN(mysqli_warning___construct);
}
return (union _zend_function*)&f;
@ -877,7 +877,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
* single value is an array. Also we'd have to make that one
* argument passed by reference.
*/
zend_throw_exception(zend_exception_get_default(), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
zend_throw_exception(zend_exception_get_default(TSRMLS_C), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
return;
}
} else {
@ -892,7 +892,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
fcc.object_pp = &return_value;
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
} else {
if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
@ -902,7 +902,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
efree(fci.params);
}
} else if (ctor_params) {
zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
}
}
}

2
ext/mysqli/mysqli_driver.c

@ -79,7 +79,7 @@ static int driver_report_write(mysqli_object *obj, zval *value TSRMLS_DC)
{
MyG(report_mode) = Z_LVAL_P(value);
php_set_error_handling(MyG(report_mode) & MYSQLI_REPORT_STRICT ? EH_THROW : EH_NORMAL,
zend_exception_get_default() TSRMLS_CC);
zend_exception_get_default(TSRMLS_C) TSRMLS_CC);
return SUCCESS;
}
/* }}} */

6
ext/pgsql/pgsql.c

@ -2107,7 +2107,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type,
* single value is an array. Also we'd have to make that one
* argument passed by reference.
*/
zend_throw_exception(zend_exception_get_default(), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
zend_throw_exception(zend_exception_get_default(TSRMLS_C), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
return;
}
} else {
@ -2122,7 +2122,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type,
fcc.object_pp = &return_value;
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
} else {
if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
@ -2132,7 +2132,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type,
efree(fci.params);
}
} else if (ctor_params) {
zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
}
}
}

2
ext/reflection/php_reflection.c

@ -4409,7 +4409,7 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */
reflection_object_handlers.write_property = _reflection_write_property;
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionException", reflection_exception_functions);
reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(), NULL TSRMLS_CC);
reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
INIT_CLASS_ENTRY(_reflection_entry, "Reflection", reflection_functions);
reflection_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC);

26
ext/simplexml/simplexml.c

@ -1567,7 +1567,7 @@ static int cast_object(zval *object, int type, char *contents TSRMLS_DC)
/* {{{ sxe_object_cast()
*/
static int sxe_object_cast(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC)
static int sxe_object_cast(zval *readobj, zval *writeobj, int type TSRMLS_DC)
{
php_sxe_object *sxe;
char *contents = NULL;
@ -1579,9 +1579,6 @@ static int sxe_object_cast(zval *readobj, zval *writeobj, int type, int should_f
if (type == IS_BOOL) {
node = php_sxe_get_first_node(sxe, NULL TSRMLS_CC);
empty = node == NULL && zend_hash_num_elements(sxe_properties_get(readobj TSRMLS_CC)) == 0;
if (should_free) {
zval_dtor(readobj);
}
INIT_PZVAL(writeobj);
ZVAL_BOOL(writeobj, !empty);
return SUCCESS;
@ -1606,10 +1603,6 @@ static int sxe_object_cast(zval *readobj, zval *writeobj, int type, int should_f
}
}
if (should_free) {
zval_dtor(readobj);
}
rv = cast_object(writeobj, type, contents TSRMLS_CC);
if (contents) {
@ -1655,7 +1648,7 @@ static zval *sxe_get_value(zval *z TSRMLS_DC)
MAKE_STD_ZVAL(retval);
if (sxe_object_cast(z, retval, IS_STRING, 0 TSRMLS_CC)==FAILURE) {
if (sxe_object_cast(z, retval, IS_STRING TSRMLS_CC)==FAILURE) {
zend_error(E_ERROR, "Unable to cast node to string");
/* FIXME: Should not be fatal */
}
@ -1848,11 +1841,7 @@ php_sxe_register_object(php_sxe_object *intern TSRMLS_DC)
zend_object_value rv;
rv.handle = zend_objects_store_put(intern, sxe_object_dtor, (zend_objects_free_object_storage_t)sxe_object_free_storage, sxe_object_clone TSRMLS_CC);
if (EG(ze1_compatibility_mode)) {
rv.handlers = (zend_object_handlers *) &sxe_ze1_object_handlers;
} else {
rv.handlers = (zend_object_handlers *) &sxe_object_handlers;
}
rv.handlers = (zend_object_handlers *) &sxe_object_handlers;
return rv;
}
@ -1962,7 +1951,7 @@ SXE_METHOD(__construct)
long options = 0;
zend_bool is_url = 0;
php_set_error_handling(EH_THROW, zend_exception_get_default() TSRMLS_CC);
php_set_error_handling(EH_THROW, zend_exception_get_default(TSRMLS_C) TSRMLS_CC);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lb", &data, &data_len, &options, &is_url) == FAILURE) {
php_std_error_handling();
return;
@ -1974,7 +1963,7 @@ SXE_METHOD(__construct)
if (!docp) {
((php_libxml_node_object *)sxe)->document = NULL;
zend_throw_exception(zend_exception_get_default(), "String could not be parsed as XML", 0 TSRMLS_CC);
zend_throw_exception(zend_exception_get_default(TSRMLS_C), "String could not be parsed as XML", 0 TSRMLS_CC);
return;
}
@ -2055,10 +2044,13 @@ static xmlNodePtr php_sxe_reset_iterator(php_sxe_object *sxe, int use_data TSRML
return NULL;
}
zend_object_iterator *php_sxe_get_iterator(zend_class_entry *ce, zval *object TSRMLS_DC)
zend_object_iterator *php_sxe_get_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC)
{
php_sxe_iterator *iterator = emalloc(sizeof(php_sxe_iterator));
if (by_ref) {
zend_error(E_ERROR, "An iterator cannot be used with foreach by reference");
}
object->refcount++;
iterator->intern.data = (void*)object;
iterator->intern.funcs = &php_sxe_iterator_funcs;

16
ext/soap/soap.c

@ -278,11 +278,7 @@ PHP_METHOD(SoapParam, SoapParam);
/* SoapHeader Functions */
PHP_METHOD(SoapHeader, SoapHeader);
#ifdef ZEND_ENGINE_2
#define SOAP_CTOR(class_name, func_name, arginfo, flags) ZEND_FENTRY(__construct, ZEND_FN(class_name##_##func_name), arginfo, flags)
#else
#define SOAP_CTOR(class_name, func_name, arginfo, flags) PHP_ME(class_name, func_name, arginfo, flags)
#endif
static zend_function_entry soap_functions[] = {
#ifdef HAVE_PHP_DOMXML
@ -337,11 +333,7 @@ unsigned char __soap_call_args[] = { 5, BYREF_NONE, BYREF_NONE, BYREF_NONE, BYRE
static zend_function_entry soap_client_functions[] = {
SOAP_CTOR(SoapClient, SoapClient, NULL, 0)
PHP_ME(SoapClient, __call, __call_args, 0)
#ifdef ZEND_ENGINE_2
ZEND_FENTRY(__soapCall, ZEND_FN(SoapClient___call), __soap_call_args, 0)
#else
ZEND_NAMED_FE(__soapCall, ZEND_FN(SoapClient___call), __soap_call_args)
#endif
ZEND_NAMED_ME(__soapCall, ZEND_MN(SoapClient___call), __soap_call_args, 0)
PHP_ME(SoapClient, __getLastRequest, NULL, 0)
PHP_ME(SoapClient, __getLastResponse, NULL, 0)
PHP_ME(SoapClient, __getLastRequestHeaders, NULL, 0)
@ -546,7 +538,7 @@ PHP_MINIT_FUNCTION(soap)
zend_internal_function fe;
fe.type = ZEND_INTERNAL_FUNCTION;
fe.handler = ZEND_FN(SoapClient___call);
fe.handler = ZEND_MN(SoapClient___call);
fe.function_name = NULL;
fe.scope = NULL;
fe.fn_flags = 0;
@ -575,7 +567,7 @@ PHP_MINIT_FUNCTION(soap)
/* Register SoapFault class */
INIT_CLASS_ENTRY(ce, PHP_SOAP_FAULT_CLASSNAME, soap_fault_functions);
#ifdef ZEND_ENGINE_2
soap_fault_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC);
soap_fault_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
#else
soap_fault_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
#endif
@ -3055,7 +3047,7 @@ static void set_soap_fault(zval *obj, char *fault_code_ns, char *fault_code, cha
if (fault_string != NULL) {
add_property_string(obj, "faultstring", fault_string, 1);
#ifdef ZEND_ENGINE_2
zend_update_property_string(zend_exception_get_default(), obj, "message", sizeof("message")-1, fault_string TSRMLS_CC);
zend_update_property_string(zend_exception_get_default(TSRMLS_C), obj, "message", sizeof("message")-1, fault_string TSRMLS_CC);
#endif
}
if (fault_code != NULL) {

91
ext/sqlite/sqlite.c

@ -207,61 +207,61 @@ zend_function_entry sqlite_functions[] = {
};
zend_function_entry sqlite_funcs_db[] = {
PHP_ME_MAPPING(__construct, sqlite_open, third_arg_force_ref)
/* PHP_ME_MAPPING(close, sqlite_close, NULL)*/
PHP_ME_MAPPING(query, sqlite_query, third_arg_force_ref)
PHP_ME_MAPPING(queryExec, sqlite_exec, second_arg_force_ref)
PHP_ME_MAPPING(arrayQuery, sqlite_array_query, NULL)
PHP_ME_MAPPING(singleQuery, sqlite_single_query, NULL)
PHP_ME_MAPPING(unbufferedQuery, sqlite_unbuffered_query, third_arg_force_ref)
PHP_ME_MAPPING(lastInsertRowid, sqlite_last_insert_rowid, NULL)
PHP_ME_MAPPING(changes, sqlite_changes, NULL)
PHP_ME_MAPPING(createAggregate, sqlite_create_aggregate, NULL)
PHP_ME_MAPPING(createFunction, sqlite_create_function, NULL)
PHP_ME_MAPPING(busyTimeout, sqlite_busy_timeout, NULL)
PHP_ME_MAPPING(lastError, sqlite_last_error, NULL)
PHP_ME_MAPPING(fetchColumnTypes, sqlite_fetch_column_types, NULL)
/* PHP_ME_MAPPING(error_string, sqlite_error_string, NULL) static */
/* PHP_ME_MAPPING(escape_string, sqlite_escape_string, NULL) static */
PHP_ME_MAPPING(__construct, sqlite_open, third_arg_force_ref, 0)
/* PHP_ME_MAPPING(close, sqlite_close, NULL, 0)*/
PHP_ME_MAPPING(query, sqlite_query, third_arg_force_ref, 0)
PHP_ME_MAPPING(queryExec, sqlite_exec, second_arg_force_ref, 0)
PHP_ME_MAPPING(arrayQuery, sqlite_array_query, NULL, 0)
PHP_ME_MAPPING(singleQuery, sqlite_single_query, NULL, 0)
PHP_ME_MAPPING(unbufferedQuery, sqlite_unbuffered_query, third_arg_force_ref, 0)
PHP_ME_MAPPING(lastInsertRowid, sqlite_last_insert_rowid, NULL, 0)
PHP_ME_MAPPING(changes, sqlite_changes, NULL, 0)
PHP_ME_MAPPING(createAggregate, sqlite_create_aggregate, NULL, 0)
PHP_ME_MAPPING(createFunction, sqlite_create_function, NULL, 0)
PHP_ME_MAPPING(busyTimeout, sqlite_busy_timeout, NULL, 0)
PHP_ME_MAPPING(lastError, sqlite_last_error, NULL, 0)
PHP_ME_MAPPING(fetchColumnTypes, sqlite_fetch_column_types, NULL, 0)
/* PHP_ME_MAPPING(error_string, sqlite_error_string, NULL, 0) static */
/* PHP_ME_MAPPING(escape_string, sqlite_escape_string, NULL, 0) static */
{NULL, NULL, NULL}
};
zend_function_entry sqlite_funcs_query[] = {
PHP_ME_MAPPING(fetch, sqlite_fetch_array, NULL)
PHP_ME_MAPPING(fetchObject, sqlite_fetch_object, NULL)
PHP_ME_MAPPING(fetchSingle, sqlite_fetch_single, NULL)
PHP_ME_MAPPING(fetchAll, sqlite_fetch_all, NULL)
PHP_ME_MAPPING(column, sqlite_column, NULL)
PHP_ME_MAPPING(numFields, sqlite_num_fields, NULL)
PHP_ME_MAPPING(fieldName, sqlite_field_name, NULL)
PHP_ME_MAPPING(fetch, sqlite_fetch_array, NULL, 0)
PHP_ME_MAPPING(fetchObject, sqlite_fetch_object, NULL, 0)
PHP_ME_MAPPING(fetchSingle, sqlite_fetch_single, NULL, 0)
PHP_ME_MAPPING(fetchAll, sqlite_fetch_all, NULL, 0)
PHP_ME_MAPPING(column, sqlite_column, NULL, 0)
PHP_ME_MAPPING(numFields, sqlite_num_fields, NULL, 0)
PHP_ME_MAPPING(fieldName, sqlite_field_name, NULL, 0)
/* iterator */
PHP_ME_MAPPING(current, sqlite_current, NULL)
PHP_ME_MAPPING(key, sqlite_key, NULL)
PHP_ME_MAPPING(next, sqlite_next, NULL)
PHP_ME_MAPPING(valid, sqlite_valid, NULL)
PHP_ME_MAPPING(rewind, sqlite_rewind, NULL)
PHP_ME_MAPPING(current, sqlite_current, NULL, 0)
PHP_ME_MAPPING(key, sqlite_key, NULL, 0)
PHP_ME_MAPPING(next, sqlite_next, NULL, 0)
PHP_ME_MAPPING(valid, sqlite_valid, NULL, 0)
PHP_ME_MAPPING(rewind, sqlite_rewind, NULL, 0)
/* countable */
PHP_ME_MAPPING(count, sqlite_num_rows, NULL)
PHP_ME_MAPPING(count, sqlite_num_rows, NULL, 0)
/* additional */
PHP_ME_MAPPING(prev, sqlite_prev, NULL)
PHP_ME_MAPPING(hasPrev, sqlite_has_prev, NULL)
PHP_ME_MAPPING(numRows, sqlite_num_rows, NULL)
PHP_ME_MAPPING(seek, sqlite_seek, NULL)
PHP_ME_MAPPING(prev, sqlite_prev, NULL, 0)
PHP_ME_MAPPING(hasPrev, sqlite_has_prev, NULL, 0)
PHP_ME_MAPPING(numRows, sqlite_num_rows, NULL, 0)
PHP_ME_MAPPING(seek, sqlite_seek, NULL, 0)
{NULL, NULL, NULL}
};
zend_function_entry sqlite_funcs_ub_query[] = {
PHP_ME_MAPPING(fetch, sqlite_fetch_array, NULL)
PHP_ME_MAPPING(fetchObject, sqlite_fetch_object, NULL)
PHP_ME_MAPPING(fetchSingle, sqlite_fetch_single, NULL)
PHP_ME_MAPPING(fetchAll, sqlite_fetch_all, NULL)
PHP_ME_MAPPING(column, sqlite_column, NULL)
PHP_ME_MAPPING(numFields, sqlite_num_fields, NULL)
PHP_ME_MAPPING(fieldName, sqlite_field_name, NULL)
PHP_ME_MAPPING(fetch, sqlite_fetch_array, NULL, 0)
PHP_ME_MAPPING(fetchObject, sqlite_fetch_object, NULL, 0)
PHP_ME_MAPPING(fetchSingle, sqlite_fetch_single, NULL, 0)
PHP_ME_MAPPING(fetchAll, sqlite_fetch_all, NULL, 0)
PHP_ME_MAPPING(column, sqlite_column, NULL, 0)
PHP_ME_MAPPING(numFields, sqlite_num_fields, NULL, 0)
PHP_ME_MAPPING(fieldName, sqlite_field_name, NULL, 0)
/* iterator */
PHP_ME_MAPPING(current, sqlite_current, NULL)
PHP_ME_MAPPING(next, sqlite_next, NULL)
PHP_ME_MAPPING(valid, sqlite_valid, NULL)
PHP_ME_MAPPING(current, sqlite_current, NULL, 0)
PHP_ME_MAPPING(next, sqlite_next, NULL, 0)
PHP_ME_MAPPING(valid, sqlite_valid, NULL, 0)
{NULL, NULL, NULL}
};
@ -998,12 +998,15 @@ zend_object_iterator_funcs sqlite_query_iterator_funcs = {
sqlite_iterator_rewind
};
zend_object_iterator *sqlite_get_iterator(zend_class_entry *ce, zval *object TSRMLS_DC)
zend_object_iterator *sqlite_get_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC)
{
sqlite_object_iterator *iterator = emalloc(sizeof(sqlite_object_iterator));
sqlite_object *obj = (sqlite_object*) zend_object_store_get_object(object TSRMLS_CC);
if (by_ref) {
zend_error(E_ERROR, "An iterator cannot be used with foreach by reference");
}
object->refcount++;
iterator->it.data = (void*)object;
iterator->it.funcs = ce->iterator_funcs.funcs;

8
ext/tidy/tidy.c

@ -223,8 +223,8 @@ static zend_object_value tidy_object_new_exception(zend_class_entry * TSRMLS_DC)
static zend_class_entry *tidy_get_ce_node(zval * TSRMLS_DC);
static zend_class_entry *tidy_get_ce_doc(zval * TSRMLS_DC);
static zval * tidy_instanciate(zend_class_entry *, zval * TSRMLS_DC);
static int tidy_doc_cast_handler(zval *, zval *, int, int TSRMLS_DC);
static int tidy_node_cast_handler(zval *, zval *, int, int TSRMLS_DC);
static int tidy_doc_cast_handler(zval *, zval *, int TSRMLS_DC);
static int tidy_node_cast_handler(zval *, zval *, int TSRMLS_DC);
static void tidy_doc_update_properties(PHPTidyObj * TSRMLS_DC);
static void tidy_add_default_properties(PHPTidyObj *, tidy_obj_type TSRMLS_DC);
static void *php_tidy_get_opt_val(PHPTidyDoc *, TidyOption, TidyOptionType * TSRMLS_DC);
@ -668,7 +668,7 @@ static zval * tidy_instanciate(zend_class_entry *pce, zval *object TSRMLS_DC)
return object;
}
static int tidy_doc_cast_handler(zval *in, zval *out, int type, int free TSRMLS_DC)
static int tidy_doc_cast_handler(zval *in, zval *out, int type TSRMLS_DC)
{
TidyBuffer output = {0};
PHPTidyObj *obj;
@ -700,7 +700,7 @@ static int tidy_doc_cast_handler(zval *in, zval *out, int type, int free TSRMLS_
return SUCCESS;
}
static int tidy_node_cast_handler(zval *in, zval *out, int type, int free TSRMLS_DC)
static int tidy_node_cast_handler(zval *in, zval *out, int type TSRMLS_DC)
{
TidyBuffer buf = {0};
PHPTidyObj *obj;

74
ext/xmlwriter/php_xmlwriter.c

@ -193,51 +193,51 @@ static zend_function_entry xmlwriter_functions[] = {
#ifdef ZEND_ENGINE_2
/* {{{ xmlwriter_class_functions */
static zend_function_entry xmlwriter_class_functions[] = {
PHP_ME_MAPPING(openUri, xmlwriter_open_uri, NULL)
PHP_ME_MAPPING(openMemory, xmlwriter_open_memory, NULL)
PHP_ME_MAPPING(openUri, xmlwriter_open_uri, NULL, 0)
PHP_ME_MAPPING(openMemory, xmlwriter_open_memory, NULL, 0)
#if LIBXML_VERSION >= 20605
PHP_ME_MAPPING(setIndent, xmlwriter_set_indent, NULL)
PHP_ME_MAPPING(setIndentString, xmlwriter_set_indent_string, NULL)
PHP_ME_MAPPING(setIndent, xmlwriter_set_indent, NULL, 0)
PHP_ME_MAPPING(setIndentString, xmlwriter_set_indent_string, NULL, 0)
#endif
#if LIBXML_VERSION >= 20607
PHP_ME_MAPPING(startComment, xmlwriter_start_comment, NULL)
PHP_ME_MAPPING(endComment, xmlwriter_end_comment, NULL)
PHP_ME_MAPPING(startComment, xmlwriter_start_comment, NULL, 0)
PHP_ME_MAPPING(endComment, xmlwriter_end_comment, NULL, 0)
#endif
PHP_ME_MAPPING(startAttribute, xmlwriter_start_attribute, NULL)
PHP_ME_MAPPING(endAttribute, xmlwriter_end_attribute, NULL)
PHP_ME_MAPPING(writeAttribute, xmlwriter_write_attribute, NULL)
PHP_ME_MAPPING(startAttribute, xmlwriter_start_attribute, NULL, 0)
PHP_ME_MAPPING(endAttribute, xmlwriter_end_attribute, NULL, 0)
PHP_ME_MAPPING(writeAttribute, xmlwriter_write_attribute, NULL, 0)
#if LIBXML_VERSION > 20617
PHP_ME_MAPPING(startAttributeNs, xmlwriter_start_attribute_ns,NULL)
PHP_ME_MAPPING(writeAttributeNs, xmlwriter_write_attribute_ns,NULL)
PHP_ME_MAPPING(startAttributeNs, xmlwriter_start_attribute_ns,NULL, 0)
PHP_ME_MAPPING(writeAttributeNs, xmlwriter_write_attribute_ns,NULL, 0)
#endif
PHP_ME_MAPPING(startElement, xmlwriter_start_element, NULL)
PHP_ME_MAPPING(endElement, xmlwriter_end_element, NULL)
PHP_ME_MAPPING(startElementNs, xmlwriter_start_element_ns, NULL)
PHP_ME_MAPPING(writeElement, xmlwriter_write_element, NULL)
PHP_ME_MAPPING(writeElementNs, xmlwriter_write_element_ns, NULL)
PHP_ME_MAPPING(startPi, xmlwriter_start_pi, NULL)
PHP_ME_MAPPING(endPi, xmlwriter_end_pi, NULL)
PHP_ME_MAPPING(writePi, xmlwriter_write_pi, NULL)
PHP_ME_MAPPING(startCdata, xmlwriter_start_cdata, NULL)
PHP_ME_MAPPING(endCdata, xmlwriter_end_cdata, NULL)
PHP_ME_MAPPING(writeCdata, xmlwriter_write_cdata, NULL)
PHP_ME_MAPPING(text, xmlwriter_text, NULL)
PHP_ME_MAPPING(startDocument, xmlwriter_start_document, NULL)
PHP_ME_MAPPING(endDocument, xmlwriter_end_document, NULL)
PHP_ME_MAPPING(writeComment, xmlwriter_write_comment, NULL)
PHP_ME_MAPPING(startDtd, xmlwriter_start_dtd, NULL)
PHP_ME_MAPPING(endDtd, xmlwriter_end_dtd, NULL)
PHP_ME_MAPPING(writeDtd, xmlwriter_write_dtd, NULL)
PHP_ME_MAPPING(startDtdElement, xmlwriter_start_dtd_element, NULL)
PHP_ME_MAPPING(endDtdElement, xmlwriter_end_dtd_element, NULL)
PHP_ME_MAPPING(writeDtdElement, xmlwriter_write_dtd_element, NULL)
PHP_ME_MAPPING(startElement, xmlwriter_start_element, NULL, 0)
PHP_ME_MAPPING(endElement, xmlwriter_end_element, NULL, 0)
PHP_ME_MAPPING(startElementNs, xmlwriter_start_element_ns, NULL, 0)
PHP_ME_MAPPING(writeElement, xmlwriter_write_element, NULL, 0)
PHP_ME_MAPPING(writeElementNs, xmlwriter_write_element_ns, NULL, 0)
PHP_ME_MAPPING(startPi, xmlwriter_start_pi, NULL, 0)
PHP_ME_MAPPING(endPi, xmlwriter_end_pi, NULL, 0)
PHP_ME_MAPPING(writePi, xmlwriter_write_pi, NULL, 0)
PHP_ME_MAPPING(startCdata, xmlwriter_start_cdata, NULL, 0)
PHP_ME_MAPPING(endCdata, xmlwriter_end_cdata, NULL, 0)
PHP_ME_MAPPING(writeCdata, xmlwriter_write_cdata, NULL, 0)
PHP_ME_MAPPING(text, xmlwriter_text, NULL, 0)
PHP_ME_MAPPING(startDocument, xmlwriter_start_document, NULL, 0)
PHP_ME_MAPPING(endDocument, xmlwriter_end_document, NULL, 0)
PHP_ME_MAPPING(writeComment, xmlwriter_write_comment, NULL, 0)
PHP_ME_MAPPING(startDtd, xmlwriter_start_dtd, NULL, 0)
PHP_ME_MAPPING(endDtd, xmlwriter_end_dtd, NULL, 0)
PHP_ME_MAPPING(writeDtd, xmlwriter_write_dtd, NULL, 0)
PHP_ME_MAPPING(startDtdElement, xmlwriter_start_dtd_element, NULL, 0)
PHP_ME_MAPPING(endDtdElement, xmlwriter_end_dtd_element, NULL, 0)
PHP_ME_MAPPING(writeDtdElement, xmlwriter_write_dtd_element, NULL, 0)
#if LIBXML_VERSION > 20608
PHP_ME_MAPPING(startDtdAttlist, xmlwriter_start_dtd_attlist, NULL)
PHP_ME_MAPPING(endDtdAttlist, xmlwriter_end_dtd_attlist, NULL)
PHP_ME_MAPPING(writeDtdAttlist, xmlwriter_write_dtd_attlist, NULL)
PHP_ME_MAPPING(startDtdAttlist, xmlwriter_start_dtd_attlist, NULL, 0)
PHP_ME_MAPPING(endDtdAttlist, xmlwriter_end_dtd_attlist, NULL, 0)
PHP_ME_MAPPING(writeDtdAttlist, xmlwriter_write_dtd_attlist, NULL, 0)
#endif
PHP_ME_MAPPING(outputMemory, xmlwriter_output_memory, NULL)
PHP_ME_MAPPING(flush, xmlwriter_flush, NULL)
PHP_ME_MAPPING(outputMemory, xmlwriter_output_memory, NULL, 0)
PHP_ME_MAPPING(flush, xmlwriter_flush, NULL, 0)
{NULL, NULL, NULL}
};
/* }}} */

2
sapi/cli/php_cli.c

@ -1220,7 +1220,7 @@ int main(int argc, char *argv[])
zend_call_method_with_1_params(&ref, pce, &pce->constructor, "__construct", NULL, arg);
if (EG(exception)) {
zval *msg = zend_read_property(zend_exception_get_default(), EG(exception), "message", sizeof("message")-1, 0 TSRMLS_CC);
zval *msg = zend_read_property(zend_exception_get_default(TSRMLS_C), EG(exception), "message", sizeof("message")-1, 0 TSRMLS_CC);
zend_printf("Exception: %s\n", Z_STRVAL_P(msg));
zval_ptr_dtor(&EG(exception));
EG(exception) = NULL;

Loading…
Cancel
Save