mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
Added support for arrays
Better support for instances of non-public classes (based on a suggestion by Patrick Beard of NetScape)
This commit is contained in:
parent
e3f95d1c5f
commit
6e7b5172ea
4 changed files with 78 additions and 32 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue