コード例 #1
0
ファイル: daoValue.c プロジェクト: daokoder/dao
void* DaoValue_TryCastCdata( DaoValue *self, DaoType *type )
{
	if( self->type == DAO_OBJECT ){
		self = (DaoValue*) DaoObject_CastCdata( (DaoObject*) self, type );
	}
	if( self == NULL || self->type != DAO_CDATA ) return NULL;
	if( self->type != DAO_CDATA ) return NULL;
	return DaoCdata_CastData( & self->xCdata, type );
}
コード例 #2
0
ファイル: daoValue.c プロジェクト: daokoder/dao
void* DaoValue_TryCastCdataTC( DaoValue *self, DaoTypeCore *core )
{
	DaoType *type = NULL;
	if( self->type == DAO_OBJECT ){
		type = DaoVmSpace_GetType( self->xObject.defClass->nameSpace->vmSpace, core );
		self = (DaoValue*) DaoObject_CastCdata( (DaoObject*) self, type );
	}
	if( self == NULL || self->type != DAO_CDATA ) return NULL;
	if( self->type != DAO_CDATA ) return NULL;
	type = DaoVmSpace_GetType( self->xCstruct.ctype->aux->xCtype.nameSpace->vmSpace, core );
	return DaoCdata_CastData( & self->xCdata, type );
}
コード例 #3
0
ファイル: daoValue.c プロジェクト: wherby/dao
void* DaoValue_TryCastCdata( DaoValue *self, DaoType *type )
{
	if( self->type != DAO_CDATA ) return NULL;
	return DaoCdata_CastData( & self->xCdata, type );
}