FAQ
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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedMay 24, '04 at 2:56p
activeMay 24, '04 at 2:56p
posts1
users1
websitephp.net

1 user in discussion

Kamesh Jayachandran: 1 post

People

Translate

site design / logo © 2022 Grokbase