Hi All,
I am working on porting APC to PHP 5.0.
I want to know where to get all the use defined class
entries(zend_class_entry) to copy to the APC cache.

Old APC code was copying this information from CG(class_table)
I tried to do the same but could not get much of a info from here.
For example
I have a class by name 'Simple' which do not have any parent class.

The apc code checks for parent of a given class while copying
The code looks like this,

'elem' is a pointer to 'Simple' zend_class_entry
if(elem->parent)
{
        //code to copy elem->parent->name to a newly allocated memory.
}
In my class 'Simple' I expect this if to fail as I assume parent to be
null for a class that don't have any parent.

But parent is not null which makes the if to succeed and hence accessing
the name function of parent to fail with Segmentation fault.

Thanks in advance

With regards
Kamesh Jayachandran

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

Reply via email to