From: Michael Wallner Date: Thu, 12 Mar 2015 10:04:09 +0000 (+0100) Subject: STATUS => ZEND_RESULT_CODE X-Git-Tag: v0.6.0RC1~10 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=cffcf8e687650733164a8baa53d04dea98ee6ca7;p=m6w6%2Fext-pq STATUS => ZEND_RESULT_CODE --- diff --git a/src/php_pq_misc.c b/src/php_pq_misc.c index 589be77..81a4808 100644 --- a/src/php_pq_misc.c +++ b/src/php_pq_misc.c @@ -82,8 +82,8 @@ static PHP_METHOD(pqdt, __toString) ZEND_BEGIN_ARG_INFO_EX(ai_pqdt_create_from_format, 0, 0, 2) ZEND_ARG_INFO(0, format) ZEND_ARG_INFO(0, datetime) - /* ZEND_ARG_OBJ_INFO(0, timezone, DateTimezone, 1) date's arginfo is not specific */ - ZEND_ARG_INFO(0, timezone) + ZEND_ARG_OBJ_INFO(0, timezone, DateTimezone, 1) /*date's arginfo is not specific */ + /*ZEND_ARG_INFO(0, timezone) */ ZEND_END_ARG_INFO(); static PHP_METHOD(pqdt, createFromFormat) { @@ -91,7 +91,7 @@ static PHP_METHOD(pqdt, createFromFormat) char *fmt_str, *dt_str; int fmt_len, dt_len; zval *ztz = NULL; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|O", &fmt_str, &fmt_len, &dt_str, &dt_len, &ztz, php_date_get_timezone_ce()); @@ -236,7 +236,7 @@ static char caa(ArrayParserState *a, const char *any, unsigned advance) return 0; } -static STATUS add_element(ArrayParserState *a, const char *start) +static ZEND_RESULT_CODE add_element(ArrayParserState *a, const char *start) { zval *zelem; size_t el_len = a->ptr - start; @@ -266,9 +266,9 @@ static STATUS add_element(ArrayParserState *a, const char *start) return zend_hash_next_index_insert(&a->list->ht, &zelem, sizeof(zval *), NULL); } -static STATUS parse_array(ArrayParserState *a); +static ZEND_RESULT_CODE parse_array(ArrayParserState *a); -static STATUS parse_element(ArrayParserState *a) +static ZEND_RESULT_CODE parse_element(ArrayParserState *a) { const char *el; TSRMLS_FETCH_FROM_CTX(a->ts); @@ -322,7 +322,7 @@ static STATUS parse_element(ArrayParserState *a) return FAILURE; } -static STATUS parse_elements(ArrayParserState *a) +static ZEND_RESULT_CODE parse_elements(ArrayParserState *a) { TSRMLS_FETCH_FROM_CTX(a->ts); @@ -346,7 +346,7 @@ static STATUS parse_elements(ArrayParserState *a) return FAILURE; } -static STATUS parse_array(ArrayParserState *a) +static ZEND_RESULT_CODE parse_array(ArrayParserState *a) { HashTableList *list; diff --git a/src/php_pq_misc.h b/src/php_pq_misc.h index afc017b..9fc086a 100644 --- a/src/php_pq_misc.h +++ b/src/php_pq_misc.h @@ -16,7 +16,14 @@ #include -typedef int STATUS; /* SUCCESS/FAILURE */ +#if PHP_VERSION_ID < 50500 +#undef SUCCESS +#undef FAILURE +typedef enum { + SUCCESS = 0, + FAILURE = -1 +} ZEND_RESULT_CODE; +#endif #include "php_pqres.h" diff --git a/src/php_pqcancel.c b/src/php_pqcancel.c index 0edcdde..9711190 100644 --- a/src/php_pqcancel.c +++ b/src/php_pqcancel.c @@ -85,7 +85,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqcancel, __construct) { zend_error_handling zeh; zval *zconn; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &zconn, php_pqconn_class_entry); @@ -117,7 +117,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqcancel_cancel, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqcancel, cancel) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); diff --git a/src/php_pqconn.c b/src/php_pqconn.c index 142894f..47d0670 100644 --- a/src/php_pqconn.c +++ b/src/php_pqconn.c @@ -486,11 +486,11 @@ static void php_pqconn_object_write_def_auto_conv(zval*object, void *o, zval *va } } -static STATUS php_pqconn_update_socket(zval *this_ptr, php_pqconn_object_t *obj TSRMLS_DC) +static ZEND_RESULT_CODE php_pqconn_update_socket(zval *this_ptr, php_pqconn_object_t *obj TSRMLS_DC) { zval *zsocket, zmember; php_stream *stream; - STATUS retval; + ZEND_RESULT_CODE retval; int socket; if (!obj) { @@ -659,7 +659,7 @@ static PHP_METHOD(pqconn, __construct) { char *dsn_str = ""; int dsn_len = 0; long flags = 0; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sl", &dsn_str, &dsn_len, &flags); @@ -709,7 +709,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqconn_reset, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqconn, reset) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -736,7 +736,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqconn_reset_async, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqconn, resetAsync) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -767,7 +767,7 @@ static PHP_METHOD(pqconn, unlisten) zend_error_handling zeh; char *channel_str; int channel_len; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &channel_str, &channel_len); @@ -796,7 +796,7 @@ static PHP_METHOD(pqconn, unlistenAsync) { zend_error_handling zeh; char *channel_str; int channel_len; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &channel_str, &channel_len); @@ -858,7 +858,7 @@ static PHP_METHOD(pqconn, listen) { char *channel_str = NULL; int channel_len = 0; php_pq_callback_t listener = {{0}}; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sf", &channel_str, &channel_len, &listener.fci, &listener.fcc); @@ -912,7 +912,7 @@ static PHP_METHOD(pqconn, listenAsync) { char *channel_str = NULL; int channel_len = 0; php_pq_callback_t listener = {{0}}; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sf", &channel_str, &channel_len, &listener.fci, &listener.fcc); @@ -958,7 +958,7 @@ static PHP_METHOD(pqconn, notify) { zend_error_handling zeh; char *channel_str, *message_str; int channel_len, message_len; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &channel_str, &channel_len, &message_str, &message_len); @@ -995,7 +995,7 @@ static PHP_METHOD(pqconn, notifyAsync) { zend_error_handling zeh; char *channel_str, *message_str; int channel_len, message_len; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &channel_str, &channel_len, &message_str, &message_len); @@ -1024,7 +1024,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqconn_poll, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqconn, poll) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -1055,7 +1055,7 @@ static PHP_METHOD(pqconn, exec) { zend_error_handling zeh; char *query_str; int query_len; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &query_str, &query_len); @@ -1086,7 +1086,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqconn_get_result, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqconn, getResult) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -1120,7 +1120,7 @@ static PHP_METHOD(pqconn, execAsync) { php_pq_callback_t resolver = {{0}}; char *query_str; int query_len; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|f", &query_str, &query_len, &resolver.fci, &resolver.fcc); @@ -1156,7 +1156,7 @@ static PHP_METHOD(pqconn, execParams) { int query_len; zval *zparams; zval *ztypes = NULL; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sa/|a/!", &query_str, &query_len, &zparams, &ztypes); @@ -1203,7 +1203,7 @@ static PHP_METHOD(pqconn, execParamsAsync) { int query_len; zval *zparams; zval *ztypes = NULL; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sa/|a/!f", &query_str, &query_len, &zparams, &ztypes, &resolver.fci, &resolver.fcc); @@ -1238,10 +1238,10 @@ static PHP_METHOD(pqconn, execParamsAsync) { zend_restore_error_handling(&zeh TSRMLS_CC); } -STATUS php_pqconn_prepare(zval *object, php_pqconn_object_t *obj, const char *name, const char *query, php_pq_params_t *params TSRMLS_DC) +ZEND_RESULT_CODE php_pqconn_prepare(zval *object, php_pqconn_object_t *obj, const char *name, const char *query, php_pq_params_t *params TSRMLS_DC) { PGresult *res; - STATUS rv; + ZEND_RESULT_CODE rv; if (!obj) { obj = zend_object_store_get_object(object TSRMLS_CC); @@ -1271,7 +1271,7 @@ static PHP_METHOD(pqconn, prepare) { zval *ztypes = NULL; char *name_str, *query_str; int name_len, *query_len; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|a/!", &name_str, &name_len, &query_str, &query_len, &ztypes); @@ -1297,9 +1297,9 @@ static PHP_METHOD(pqconn, prepare) { } } -STATUS php_pqconn_prepare_async(zval *object, php_pqconn_object_t *obj, const char *name, const char *query, php_pq_params_t *params TSRMLS_DC) +ZEND_RESULT_CODE php_pqconn_prepare_async(zval *object, php_pqconn_object_t *obj, const char *name, const char *query, php_pq_params_t *params TSRMLS_DC) { - STATUS rv; + ZEND_RESULT_CODE rv; if (!obj) { obj = zend_object_store_get_object(object TSRMLS_CC); @@ -1327,7 +1327,7 @@ static PHP_METHOD(pqconn, prepareAsync) { zval *ztypes = NULL; char *name_str, *query_str; int name_len, *query_len; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|a/!", &name_str, &name_len, &query_str, &query_len, &ztypes); @@ -1353,10 +1353,10 @@ static PHP_METHOD(pqconn, prepareAsync) { } } -STATUS php_pqconn_declare(zval *object, php_pqconn_object_t *obj, const char *decl TSRMLS_DC) +ZEND_RESULT_CODE php_pqconn_declare(zval *object, php_pqconn_object_t *obj, const char *decl TSRMLS_DC) { PGresult *res; - STATUS rv; + ZEND_RESULT_CODE rv; if (!obj) { obj = zend_object_store_get_object(object TSRMLS_CC); @@ -1386,7 +1386,7 @@ static PHP_METHOD(pqconn, declare) { char *name_str, *query_str; int name_len, query_len; long flags; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sls", &name_str, &name_len, &flags, &query_str, &query_len); @@ -1418,9 +1418,9 @@ static PHP_METHOD(pqconn, declare) { } } -STATUS php_pqconn_declare_async(zval *object, php_pqconn_object_t *obj, const char *decl TSRMLS_DC) +ZEND_RESULT_CODE php_pqconn_declare_async(zval *object, php_pqconn_object_t *obj, const char *decl TSRMLS_DC) { - STATUS rv; + ZEND_RESULT_CODE rv; if (!obj) { obj = zend_object_store_get_object(object TSRMLS_CC); @@ -1448,7 +1448,7 @@ static PHP_METHOD(pqconn, declareAsync) { char *name_str, *query_str; int name_len, query_len; long flags; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sls", &name_str, &name_len, &flags, &query_str, &query_len); @@ -1586,9 +1586,9 @@ static PHP_METHOD(pqconn, unescapeBytea) { } } -STATUS php_pqconn_start_transaction(zval *zconn, php_pqconn_object_t *conn_obj, long isolation, zend_bool readonly, zend_bool deferrable TSRMLS_DC) +ZEND_RESULT_CODE php_pqconn_start_transaction(zval *zconn, php_pqconn_object_t *conn_obj, long isolation, zend_bool readonly, zend_bool deferrable TSRMLS_DC) { - STATUS rv = FAILURE; + ZEND_RESULT_CODE rv = FAILURE; if (!conn_obj) { conn_obj = zend_object_store_get_object(zconn TSRMLS_CC); @@ -1626,9 +1626,9 @@ STATUS php_pqconn_start_transaction(zval *zconn, php_pqconn_object_t *conn_obj, return rv; } -STATUS php_pqconn_start_transaction_async(zval *zconn, php_pqconn_object_t *conn_obj, long isolation, zend_bool readonly, zend_bool deferrable TSRMLS_DC) +ZEND_RESULT_CODE php_pqconn_start_transaction_async(zval *zconn, php_pqconn_object_t *conn_obj, long isolation, zend_bool readonly, zend_bool deferrable TSRMLS_DC) { - STATUS rv = FAILURE; + ZEND_RESULT_CODE rv = FAILURE; if (!conn_obj) { conn_obj = zend_object_store_get_object(zconn TSRMLS_CC); @@ -1674,7 +1674,7 @@ static PHP_METHOD(pqconn, startTransaction) { long isolation = obj->intern ? obj->intern->default_txn_isolation : PHP_PQTXN_READ_COMMITTED; zend_bool readonly = obj->intern ? obj->intern->default_txn_readonly : 0; zend_bool deferrable = obj->intern ? obj->intern->default_txn_deferrable : 0; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|lbb", &isolation, &readonly, &deferrable); @@ -1710,7 +1710,7 @@ static PHP_METHOD(pqconn, startTransactionAsync) { long isolation = obj->intern ? obj->intern->default_txn_isolation : PHP_PQTXN_READ_COMMITTED; zend_bool readonly = obj->intern ? obj->intern->default_txn_readonly : 0; zend_bool deferrable = obj->intern ? obj->intern->default_txn_deferrable : 0; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|lbb", &isolation, &readonly, &deferrable); @@ -1775,7 +1775,7 @@ static PHP_METHOD(pqconn, off) { zend_error_handling zeh; char *type_str; int type_len; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &type_str, &type_len); @@ -1801,7 +1801,7 @@ static PHP_METHOD(pqconn, on) { char *type_str; int type_len; php_pq_callback_t cb = {{0}}; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sf", &type_str, &type_len, &cb.fci, &cb.fcc); @@ -1849,7 +1849,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqconn_set_converter, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, converter, pq\\Converter, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqconn, setConverter) { - STATUS rv; + ZEND_RESULT_CODE rv; zend_error_handling zeh; zval *zcnv; @@ -1887,7 +1887,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqconn_unset_converter, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, converter, pq\\Converter, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqconn, unsetConverter) { - STATUS rv; + ZEND_RESULT_CODE rv; zend_error_handling zeh; zval *zcnv; diff --git a/src/php_pqconn.h b/src/php_pqconn.h index 940f214..03ad9c8 100644 --- a/src/php_pqconn.h +++ b/src/php_pqconn.h @@ -54,12 +54,12 @@ extern php_resource_factory_ops_t *php_pqconn_get_resource_factory_ops(void); extern zend_class_entry *php_pqconn_class_entry; extern zend_object_value php_pqconn_create_object_ex(zend_class_entry *ce, php_pqconn_t *intern, php_pqconn_object_t **ptr TSRMLS_DC); extern void php_pqconn_notify_listeners(php_pqconn_object_t *obj TSRMLS_DC); -extern STATUS php_pqconn_prepare(zval *object, php_pqconn_object_t *obj, const char *name, const char *query, php_pq_params_t *params TSRMLS_DC); -extern STATUS php_pqconn_prepare_async(zval *object, php_pqconn_object_t *obj, const char *name, const char *query, php_pq_params_t *params TSRMLS_DC); -extern STATUS php_pqconn_start_transaction(zval *zconn, php_pqconn_object_t *conn_obj, long isolation, zend_bool readonly, zend_bool deferrable TSRMLS_DC); -extern STATUS php_pqconn_start_transaction_async(zval *zconn, php_pqconn_object_t *conn_obj, long isolation, zend_bool readonly, zend_bool deferrable TSRMLS_DC); -extern STATUS php_pqconn_declare(zval *object, php_pqconn_object_t *obj, const char *decl TSRMLS_DC); -extern STATUS php_pqconn_declare_async(zval *object, php_pqconn_object_t *obj, const char *decl TSRMLS_DC); +extern ZEND_RESULT_CODE php_pqconn_prepare(zval *object, php_pqconn_object_t *obj, const char *name, const char *query, php_pq_params_t *params TSRMLS_DC); +extern ZEND_RESULT_CODE php_pqconn_prepare_async(zval *object, php_pqconn_object_t *obj, const char *name, const char *query, php_pq_params_t *params TSRMLS_DC); +extern ZEND_RESULT_CODE php_pqconn_start_transaction(zval *zconn, php_pqconn_object_t *conn_obj, long isolation, zend_bool readonly, zend_bool deferrable TSRMLS_DC); +extern ZEND_RESULT_CODE php_pqconn_start_transaction_async(zval *zconn, php_pqconn_object_t *conn_obj, long isolation, zend_bool readonly, zend_bool deferrable TSRMLS_DC); +extern ZEND_RESULT_CODE php_pqconn_declare(zval *object, php_pqconn_object_t *obj, const char *decl TSRMLS_DC); +extern ZEND_RESULT_CODE php_pqconn_declare_async(zval *object, php_pqconn_object_t *obj, const char *decl TSRMLS_DC); extern PHP_MINIT_FUNCTION(pqconn); extern PHP_MSHUTDOWN_FUNCTION(pqconn); diff --git a/src/php_pqcopy.c b/src/php_pqcopy.c index d652ba6..32e20ba 100644 --- a/src/php_pqcopy.c +++ b/src/php_pqcopy.c @@ -116,7 +116,7 @@ static PHP_METHOD(pqcopy, __construct) { char *expr_str, *opt_str = ""; int expr_len, opt_len = 0; long direction; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Osl|s", &zconn, php_pqconn_class_entry, &expr_str, &expr_len, &direction, &opt_str, &opt_len); @@ -180,7 +180,7 @@ static PHP_METHOD(pqcopy, put) { zend_error_handling zeh; char *data_str; int data_len; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &data_str, &data_len); @@ -209,7 +209,7 @@ static PHP_METHOD(pqcopy, end) { zend_error_handling zeh; char *error_str = NULL; int error_len = 0; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!", &error_str, &error_len); @@ -247,7 +247,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqcopy, get) { zend_error_handling zeh; zval *zdata; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &zdata); diff --git a/src/php_pqcur.c b/src/php_pqcur.c index 1ff10da..fc5be1d 100644 --- a/src/php_pqcur.c +++ b/src/php_pqcur.c @@ -52,7 +52,7 @@ static void cur_fetch_or_move(INTERNAL_FUNCTION_PARAMETERS, const char *action, { char *spec_str = "1"; int spec_len = 1; - STATUS rv; + ZEND_RESULT_CODE rv; php_pq_callback_t resolver = {{0}}; zend_error_handling zeh; @@ -194,7 +194,7 @@ static PHP_METHOD(pqcur, __construct) { int name_len, query_len; long flags; zval *zconn; - STATUS rv; + ZEND_RESULT_CODE rv; zend_bool async = 0; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); @@ -239,7 +239,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqcur, open) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -263,7 +263,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqcur, close) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); diff --git a/src/php_pqlob.c b/src/php_pqlob.c index f70ed3a..1c6e7b7 100644 --- a/src/php_pqlob.c +++ b/src/php_pqlob.c @@ -153,7 +153,7 @@ static size_t php_pqlob_stream_read(php_stream *stream, char *buffer, size_t len return read; } -static STATUS php_pqlob_stream_close(php_stream *stream, int close_handle TSRMLS_DC) +static ZEND_RESULT_CODE php_pqlob_stream_close(php_stream *stream, int close_handle TSRMLS_DC) { return SUCCESS; } @@ -163,9 +163,9 @@ static int php_pqlob_stream_flush(php_stream *stream TSRMLS_DC) return SUCCESS; } -static STATUS php_pqlob_stream_seek(php_stream *stream, off_t offset, int whence, off_t *newoffset TSRMLS_DC) +static ZEND_RESULT_CODE php_pqlob_stream_seek(php_stream *stream, off_t offset, int whence, off_t *newoffset TSRMLS_DC) { - STATUS rv = FAILURE; + ZEND_RESULT_CODE rv = FAILURE; php_pqlob_object_t *obj = stream->abstract; if (obj) { @@ -236,7 +236,7 @@ static PHP_METHOD(pqlob, __construct) { zend_error_handling zeh; zval *ztxn; long mode = INV_WRITE|INV_READ, loid = InvalidOid; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|ll", &ztxn, php_pqtxn_class_entry, &loid, &mode); @@ -285,7 +285,7 @@ static PHP_METHOD(pqlob, write) { zend_error_handling zeh; char *data_str; int data_len; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &data_str, &data_len); @@ -318,7 +318,7 @@ static PHP_METHOD(pqlob, read) { zend_error_handling zeh; long length = 0x1000; zval *zread = NULL; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|lz!", &length, &zread); @@ -357,7 +357,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqlob, seek) { zend_error_handling zeh; long offset, whence = SEEK_SET; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l", &offset, &whence); @@ -386,7 +386,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqlob_tell, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqlob, tell) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -417,7 +417,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqlob, truncate) { zend_error_handling zeh; long length = 0; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &length); diff --git a/src/php_pqres.c b/src/php_pqres.c index c050898..6e1fa68 100644 --- a/src/php_pqres.c +++ b/src/php_pqres.c @@ -77,7 +77,7 @@ static void php_pqres_iterator_dtor(zend_object_iterator *i TSRMLS_DC) efree(iter); } -static STATUS php_pqres_iterator_valid(zend_object_iterator *i TSRMLS_DC) +static ZEND_RESULT_CODE php_pqres_iterator_valid(zend_object_iterator *i TSRMLS_DC) { php_pqres_iterator_t *iter = (php_pqres_iterator_t *) i; php_pqres_object_t *obj = i->data; @@ -387,7 +387,7 @@ static int php_pqres_count_elements(zval *object, long *count TSRMLS_DC) } } -STATUS php_pqres_success(PGresult *res TSRMLS_DC) +ZEND_RESULT_CODE php_pqres_success(PGresult *res TSRMLS_DC) { zval *zexc; @@ -598,9 +598,9 @@ static void php_pqres_object_write_auto_conv(zval *object, void *o, zval *value } } -static STATUS php_pqres_iteration(zval *this_ptr, php_pqres_object_t *obj, php_pqres_fetch_t fetch_type, zval ***row TSRMLS_DC) +static ZEND_RESULT_CODE php_pqres_iteration(zval *this_ptr, php_pqres_object_t *obj, php_pqres_fetch_t fetch_type, zval ***row TSRMLS_DC) { - STATUS rv; + ZEND_RESULT_CODE rv; php_pqres_fetch_t orig_fetch; if (!obj) { @@ -628,7 +628,7 @@ typedef struct php_pqres_col { int num; } php_pqres_col_t; -static STATUS column_nn(php_pqres_object_t *obj, zval *zcol, php_pqres_col_t *col TSRMLS_DC) +static ZEND_RESULT_CODE column_nn(php_pqres_object_t *obj, zval *zcol, php_pqres_col_t *col TSRMLS_DC) { long index = -1; char *name = NULL; @@ -683,7 +683,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqres, bind) { zval *zcol, *zref; zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/z", &zcol, &zref); @@ -718,7 +718,7 @@ static int apply_bound(void *p TSRMLS_DC, int argc, va_list argv, zend_hash_key { zval **zvalue, **zbound = p; zval **zrow = va_arg(argv, zval **); - STATUS *rv = va_arg(argv, STATUS *); + ZEND_RESULT_CODE *rv = va_arg(argv, ZEND_RESULT_CODE *); if (SUCCESS != zend_hash_index_find(Z_ARRVAL_PP(zrow), key->h, (void *) &zvalue)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to find column ad index %lu", key->h); @@ -740,7 +740,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqres_fetch_bound, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqres, fetchBound) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -776,7 +776,7 @@ static PHP_METHOD(pqres, fetchRow) { zend_error_handling zeh; php_pqres_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC); long fetch_type = -1; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &fetch_type); @@ -828,7 +828,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqres, fetchCol) { zend_error_handling zeh; zval *zcol = NULL, *zref; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|z/!", &zref, &zcol); @@ -872,7 +872,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqres, fetchAllCols) { zend_error_handling zeh; zval *zcol = NULL; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|z!", &zcol); @@ -903,7 +903,7 @@ static PHP_METHOD(pqres, fetchAllCols) { struct apply_to_col_arg { php_pqres_object_t *obj; php_pqres_col_t *cols; - STATUS status; + ZEND_RESULT_CODE status; }; static int apply_to_col(void *p, void *a TSRMLS_DC) @@ -948,7 +948,7 @@ static PHP_METHOD(pqres, map) { zend_error_handling zeh; zval *zkeys = 0, *zvals = 0; long fetch_type = -1; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|z/!z/!l", &zkeys, &zvals, &fetch_type); @@ -1068,7 +1068,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqres, fetchAll) { zend_error_handling zeh; long fetch_type = -1; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &fetch_type); @@ -1097,7 +1097,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqres_count, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqres, count) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -1118,7 +1118,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqres_desc, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqres, desc) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); diff --git a/src/php_pqres.h b/src/php_pqres.h index ca22aa1..f5f80bf 100644 --- a/src/php_pqres.h +++ b/src/php_pqres.h @@ -54,7 +54,7 @@ typedef struct php_pqres_object { php_pqres_t *intern; } php_pqres_object_t; -extern STATUS php_pqres_success(PGresult *res TSRMLS_DC); +extern ZEND_RESULT_CODE php_pqres_success(PGresult *res TSRMLS_DC); extern void php_pqres_init_instance_data(PGresult *res, php_pqconn_object_t *obj, php_pqres_object_t **ptr TSRMLS_DC); extern zval *php_pqres_row_to_zval(PGresult *res, unsigned row, php_pqres_fetch_t fetch_type, zval **data_ptr TSRMLS_DC); extern zval *php_pqres_typed_zval(php_pqres_t *res, char *val, size_t len, Oid typ TSRMLS_DC); diff --git a/src/php_pqstm.c b/src/php_pqstm.c index d360d0d..6d61a19 100644 --- a/src/php_pqstm.c +++ b/src/php_pqstm.c @@ -180,7 +180,7 @@ static PHP_METHOD(pqstm, __construct) { char *name_str, *query_str; int name_len, *query_len; zend_bool async = 0; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Oss|a/!b", &zconn, php_pqconn_class_entry, &name_str, &name_len, &query_str, &query_len, &ztypes, &async); @@ -217,7 +217,7 @@ static PHP_METHOD(pqstm, bind) { long param_no; zval **param_ref; zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lZ", ¶m_no, ¶m_ref); @@ -245,7 +245,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqstm, exec) { zend_error_handling zeh; zval *zparams = NULL; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|a/!", &zparams); @@ -283,7 +283,7 @@ static PHP_METHOD(pqstm, execAsync) { zend_error_handling zeh; zval *zparams = NULL; php_pq_callback_t resolver = {{0}}; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|a/!f", &zparams, &resolver.fci, &resolver.fcc); @@ -323,7 +323,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqstm_desc, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqstm, desc) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -363,7 +363,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqstm, descAsync) { zend_error_handling zeh; php_pq_callback_t resolver = {{0}}; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f", &resolver.fci, &resolver.fcc); @@ -389,7 +389,7 @@ static PHP_METHOD(pqstm, descAsync) { static zend_always_inline void php_pqstm_deallocate_handler(INTERNAL_FUNCTION_PARAMETERS, zend_bool async) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -423,7 +423,7 @@ static PHP_METHOD(pqstm, deallocateAsync) static zend_always_inline void php_pqstm_prepare_handler(INTERNAL_FUNCTION_PARAMETERS, zend_bool async) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); diff --git a/src/php_pqtxn.c b/src/php_pqtxn.c index b48cf7e..e0574e8 100644 --- a/src/php_pqtxn.c +++ b/src/php_pqtxn.c @@ -217,7 +217,7 @@ static PHP_METHOD(pqtxn, __construct) { zval *zconn; long isolation = PHP_PQTXN_READ_COMMITTED; zend_bool async = 0, readonly = 0, deferrable = 0; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|blbb", &zconn, php_pqconn_class_entry, &async, &isolation, &readonly, &deferrable); @@ -269,7 +269,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqtxn_savepoint, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqtxn, savepoint) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -309,7 +309,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqtxn_savepoint_async, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqtxn, savepointAsync) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -343,7 +343,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqtxn_commit, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqtxn, commit) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -392,7 +392,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqtxn_commit_async, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqtxn, commitAsync) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -439,7 +439,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqtxn_rollback, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqtxn, rollback) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -488,7 +488,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqtxn_rollback_async, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqtxn, rollbackAsync) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -535,7 +535,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqtxn_export_snapshot, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqtxn, exportSnapshot) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -568,7 +568,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_pqtxn_export_snapshot_async, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(pqtxn, exportSnapshotAsync) { zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters_none(); @@ -595,7 +595,7 @@ static PHP_METHOD(pqtxn, importSnapshot) { zend_error_handling zeh; char *snapshot_str; int snapshot_len; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &snapshot_str, &snapshot_len); @@ -644,7 +644,7 @@ static PHP_METHOD(pqtxn, importSnapshotAsync) { zend_error_handling zeh; char *snapshot_str; int snapshot_len; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &snapshot_str, &snapshot_len); @@ -689,7 +689,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqtxn, openLOB) { zend_error_handling zeh; long mode = INV_WRITE|INV_READ, loid; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l", &loid, &mode); @@ -728,7 +728,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqtxn, createLOB) { zend_error_handling zeh; long mode = INV_WRITE|INV_READ; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &mode); @@ -773,7 +773,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqtxn, unlinkLOB) { zend_error_handling zeh; long loid; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &loid); @@ -805,7 +805,7 @@ static PHP_METHOD(pqtxn, importLOB) { char *path_str; int path_len; long oid = InvalidOid; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|l", &path_str, &path_len, &oid); @@ -843,7 +843,7 @@ static PHP_METHOD(pqtxn, exportLOB) { char *path_str; int path_len; long oid; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lp", &oid, &path_str, &path_len); diff --git a/src/php_pqtypes.c b/src/php_pqtypes.c index 8f4b53d..6cf5741 100644 --- a/src/php_pqtypes.c +++ b/src/php_pqtypes.c @@ -189,7 +189,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqtypes, __construct) { zend_error_handling zeh; zval *zconn, *znsp = NULL; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|a!", &zconn, php_pqconn_class_entry, &znsp); @@ -260,7 +260,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqtypes, refresh) { HashTable *nsp = NULL; zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|H/!", &nsp);