What if I don't want this "something" to inherit my program?
And why should you disallow that?
Please do not take this as me being contrary, I am just trying to figure out why you would not want that.
It is possible to compare types in Pike (typeof(A) == typeof(B)),
It is possible, but that pike code does not do that, it compares the interfaces.
get_storage is the correct way to do it in pike.
If you do not currently have a program pointer in your C-module, you might want to get one.
Otherwise it will be neigh-on impossible to compare the types.
/ Per Hedbor ()
Previous text:
2004-02-03 14:05: Subject: Re: Object comparision in C module
On Tue, Feb 03, 2004 at 01:50:01PM +0100, Mirar @ Pike developers forum wrote:
Why do you need that? What if something inherits your program? Or have another class with a compatible API?
What if I don't want this "something" to inherit my program?
It is possible to compare types in Pike (typeof(A) == typeof(B)), so why it shouldn't be possible to do in C?
Regards, /Al
/ Brevbäraren