From 6e7b5172ea13cff0dd52e5baa79b775592da0580 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Sun, 20 Feb 2000 12:09:34 +0000 Subject: Added support for arrays Better support for instances of non-public classes (based on a suggestion by Patrick Beard of NetScape) --- ext/java/java.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ext/java/java.c') diff --git a/ext/java/java.c b/ext/java/java.c index 0cdd8ad8cb..f1f5cb17d7 100644 --- a/ext/java/java.c +++ b/ext/java/java.c @@ -513,6 +513,22 @@ JNIEXPORT void JNICALL Java_net_php_reflect_setResultFromObject &handle, sizeof(pval *), NULL); } +JNIEXPORT void JNICALL Java_net_php_reflect_setResultFromArray + (JNIEnv *jenv, jclass self, jlong result) +{ + array_init( (pval*)(long)result ); +} + +JNIEXPORT jlong JNICALL Java_net_php_reflect_nextElement + (JNIEnv *jenv, jclass self, jlong array) +{ + pval *result; + pval *handle = (pval*)(long)array; + ALLOC_ZVAL(result); + zend_hash_next_index_insert(handle->value.ht, &result, sizeof(zval *), NULL); + return (jlong)(long)result; +} + JNIEXPORT void JNICALL Java_net_php_reflect_setException (JNIEnv *jenv, jclass self, jlong result, jstring value) { -- cgit v1.2.1