mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
Allow java.lang.Hashtables to be passed into PHP as arrays.
This commit is contained in:
parent
7893c72965
commit
3f4c7c8359
4 changed files with 46 additions and 0 deletions
|
@ -730,6 +730,19 @@ JNIEXPORT jlong JNICALL Java_net_php_reflect_nextElement
|
|||
return (jlong)(long)result;
|
||||
}
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_net_php_reflect_hashUpdate
|
||||
(JNIEnv *jenv, jclass self, jlong array, jbyteArray key)
|
||||
{
|
||||
pval *result;
|
||||
pval pkey;
|
||||
pval *handle = (pval*)(long)array;
|
||||
ALLOC_ZVAL(result);
|
||||
Java_net_php_reflect_setResultFromString(jenv, self, (jlong)(long)&pkey, key);
|
||||
zend_hash_update(handle->value.ht, pkey.value.str.val, pkey.value.str.len+1,
|
||||
&result, sizeof(zval *), NULL);
|
||||
return (jlong)(long)result;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_net_php_reflect_setException
|
||||
(JNIEnv *jenv, jclass self, jlong result, jbyteArray value)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue