X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fphp_pqres.h;h=acc03ccabd357e5a4d536856f239c5236be4eb3b;hb=baafbf6c24c8f272b714d3829857eca3833bca3e;hp=f5f80bfa576ee07317753c4fc8b21b0f684bbb41;hpb=cffcf8e687650733164a8baa53d04dea98ee6ca7;p=m6w6%2Fext-pq diff --git a/src/php_pqres.h b/src/php_pqres.h index f5f80bf..acc03cc 100644 --- a/src/php_pqres.h +++ b/src/php_pqres.h @@ -33,7 +33,7 @@ typedef enum php_pqres_fetch { typedef struct php_pqres_iterator { zend_object_iterator zi; - zval *current_val; + zval current_val; unsigned index; php_pqres_fetch_t fetch_type; } php_pqres_iterator_t; @@ -48,16 +48,13 @@ typedef struct php_pqres { } php_pqres_t; typedef struct php_pqres_object { - zend_object zo; - zend_object_value zv; - HashTable *prophandler; - php_pqres_t *intern; + PHP_PQ_OBJ_DECL(php_pqres_t *) } php_pqres_object_t; -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); +extern ZEND_RESULT_CODE php_pqres_success(PGresult *res); +extern php_pqres_object_t *php_pqres_init_instance_data(PGresult *res, php_pqconn_object_t *obj); +extern zval *php_pqres_row_to_zval(PGresult *res, unsigned row, php_pqres_fetch_t fetch_type, zval *data); +extern zval *php_pqres_typed_zval(php_pqres_t *res, Oid typ, zval *zv); extern php_pqres_fetch_t php_pqres_fetch_type(php_pqres_t *res); #include "php_pq_object.h" @@ -65,14 +62,14 @@ extern php_pqres_fetch_t php_pqres_fetch_type(php_pqres_t *res); #define PHP_PQclear(_r) do { \ php_pqres_object_t *_o = PQresultInstanceData((_r), php_pqconn_event); \ if (_o) { \ - php_pq_object_delref(_o TSRMLS_CC); \ + php_pq_object_delref(_o); \ } else { \ PQclear(_r); \ } \ } while(0) extern zend_class_entry *php_pqres_class_entry; -extern zend_object_value php_pqres_create_object_ex(zend_class_entry *ce, php_pqres_t *intern, php_pqres_object_t **ptr TSRMLS_DC); +extern php_pqres_object_t *php_pqres_create_object_ex(zend_class_entry *ce, php_pqres_t *intern); extern PHP_MINIT_FUNCTION(pqres); extern PHP_MSHUTDOWN_FUNCTION(pqres);