Ok,
I don't think default_properties is what you are looking for.
default_properties store the information about defined variables and their
default value. Like this:
class MyClass {
var $test = "mytest";
}
at compile time MyClass class_entry will have "test" => "mytest" in its default
properties. Where as:
$t = new MyClass();
$t->other_test = "my other test";
at runtime "other_test" => "my other test" will be stored in
zend_object.properties. So from your example I beleieve you are just trying to
do the second case. So if this is true then.
void define_a_class()
{
/* make a class with two properties, one of which is an array */
zval *obj_inst;
zval *array;
INIT_CLASS_ENTRY(tmp_class_entry, "class_name", class_name_functions);
class_name_class_entry = zend_register_internal_class(&tmp_class_entry);
MAKE_STD_ZVAL(obj_inst);
object_init_ex(obj_inst, tmp_class_entry);
add_property_null(obj_inst, "prop_name"); // defined in zend_API.h
MAKE_STD_ZVAL(array);
array_init(array);
add_next_index_string(array, "foo", 1);
add_property_zval(obj_inst, "prop_name1", &array); // defined in
zend_API.h
}
- brad
--- Derick Rethans <[EMAIL PROTECTED]> wrote:
> On 8 Oct 2002, Tim Daly, Jr. wrote:
>
> >
> > Brad LaFountain <[EMAIL PROTECTED]> writes:
> >
> > > What engine are you working with 1 or 2?
> > > -brad
> >
> > I imagine PHP3 == engine 1, and PHP4 == engine 2?
>
> PHP 3 is engine 0.5, PHP 4 is engine 1 and PHP 5 will be engine 2 :)
>
> So you're most likely using engine 1.
>
> Derick
> >
>
> --
>
> ---------------------------------------------------------------------------
> Derick Rethans http://derickrethans.nl/
> JDI Media Solutions
> --------------[ if you hold a unix shell to your ear, do you hear the c? ]-
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php