summaryrefslogtreecommitdiff
path: root/ext/sqlite/sqlite.c
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-04-15 15:55:32 +0000
committerAntony Dovgal <tony2001@php.net>2006-04-15 15:55:32 +0000
commit0574532ee471906cac9ab1ebbe5b1d996fb1664b (patch)
treeefec148142483764d30386df1058b351e16c3775 /ext/sqlite/sqlite.c
parentca715a05e56761ee891395663b53ddfc45c77bdb (diff)
downloadphp-git-0574532ee471906cac9ab1ebbe5b1d996fb1664b.tar.gz
fix compile failure
Diffstat (limited to 'ext/sqlite/sqlite.c')
-rw-r--r--ext/sqlite/sqlite.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c
index 720bc08fd1..906f44ab7c 100644
--- a/ext/sqlite/sqlite.c
+++ b/ext/sqlite/sqlite.c
@@ -995,6 +995,7 @@ zend_object_iterator_funcs sqlite_query_iterator_funcs = {
zend_object_iterator *sqlite_get_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC)
{
sqlite_object_iterator *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");
@@ -1002,8 +1003,6 @@ zend_object_iterator *sqlite_get_iterator(zend_class_entry *ce, zval *object, in
iterator = emalloc(sizeof(sqlite_object_iterator));
- sqlite_object *obj = (sqlite_object*) zend_object_store_get_object(object TSRMLS_CC);
-
object->refcount++;
iterator->it.data = (void*)object;
iterator->it.funcs = ce->iterator_funcs.funcs;