[Mono-devel-list] CAS Patch for InheritanceDemand

Sebastien Pouliot spouliot at videotron.ca
Thu Feb 17 11:55:59 EST 2005


Thanks Paolo,

Updated patch is in SVN.


> > +/* defined in metadata/class.c */
> > +extern void (*mono_inheritancedemand_class) (MonoClass *klass, 
> MonoClass *parent);
> > +extern void (*mono_inheritancedemand_method) (MonoMethod 
> *override, MonoMethod *base);
> 
> What is this stuff?

Oops, it's a left over because I started the patch before libmono and 
libmetadata were combined into one library. 

Removed.


> Maybe, while we are at it, define a new API:
> 
> gboolean
> mono_class_set_failure (MonoClass *klass, guint32 ex_type, void *ex_data)
> {
> 	if (klass->exception_type)
> 		return FALSE;
> 	klass->exception_type = ex_type;
> 	klass->exception_data = ex_data;
> 	return TRUE;
> }
> 
> And we could have a function to create the relevant exception object:
> 
> MonoException*
> mono_class_get_exception_for_Failure (MonoClass *klass)
> {
> 	switch (klass->exception_type) {
> 	case ...: create security exception;
> 	case ...: create typeload exception;
> 	...
> 	}
> }

Added both.

Thanks.



More information about the Mono-devel-list mailing list