Try something like this:

if (rep_CONSP(in)) {
    array_init(return_value); /* sets it up as an array */

   for (i = in; i != Qnil; i = rep_CDR(i)) {
      zval *tmp;

      MAKE_STD_ZVAL(tmp);
      rep_data_converter(rep_CAR(i), tmp);
      add_next_index_zval(return_value, tmp); /* equivalent to $ret[] = $tmp
*/
   }
}


>     if(rep_CONSP(in)) {
>         zval php_array;
>         //zend_hash_init(&php_array,100,
>         repv i,t;
>         for(i=in;i!=Qnil;i=rep_CDR(i)) {
>             printf("REP FWD to next element\n");
>             rep_data_converter(rep_CAR(i),&t);
>             /* ??? add t to array php_array */
>         }
>     }

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to