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;
} 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"
#include "php_pqconn_event.h"
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);