Re: [Vala] Gst.TypeFindFactory cast fails



Hello,
                   في ث، 02-11-2010 عند 10:22 -0700 ، كتب Robert Powell:
Hi,

I'm trying to use Gst.TypeFindFactory, but the cast call generates incorrect
C code.

Gst.TypeFindFactory type_find = (Gst.TypeFindFactory)feature;

generates

GstTypeFindFactory* type_find;
type_find = _gst_object_ref0 (GST_TYPEFIND_FACTORY (feature));

but gst/gsttypefindfactory.h has

#define GST_TYPE_TYPE_FIND_FACTORY
(gst_type_find_factory_get_type())

Is there any vapi magic that will tell vala to generate
GST_TYPE_TYPE_FIND_FACTORY rather than GST_TYPEFIND_FACTORY?  I could not
find any combination that worked.
I think you want it to generate GST_TYPE_FIND_FACTORY :-)

You need to add the following annotation to the declaration (possibly
merging it with the current CCode annotation if any)
[CCode (lower_case_csuffix="type_find_factory")]

HTH,
Abderrahim




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]