perl-GStreamer r86 - in trunk: . xs
- From: tsch svn gnome org
- To: svn-commits-list gnome org
- Subject: perl-GStreamer r86 - in trunk: . xs
- Date: Wed, 26 Nov 2008 20:56:53 +0000 (UTC)
Author: tsch
Date: Wed Nov 26 20:56:53 2008
New Revision: 86
URL: http://svn.gnome.org/viewvc/perl-GStreamer?rev=86&view=rev
Log:
(SvGstStructure): Fail loudly with a meaningful error message when an
unregistered package name is encountered.
Modified:
trunk/ChangeLog
trunk/xs/GstStructure.xs
Modified: trunk/xs/GstStructure.xs
==============================================================================
--- trunk/xs/GstStructure.xs (original)
+++ trunk/xs/GstStructure.xs Wed Nov 26 20:56:53 2008
@@ -77,7 +77,12 @@
field_value && SvOK (*field_value)) {
GValue value = { 0, };
- g_value_init (&value, gperl_type_from_package (SvPV_nolen (*field_type)));
+ const char *package = SvPV_nolen (*field_type);
+ GType type = gperl_type_from_package (package);
+ if (!type)
+ croak ("unregistered package %s encountered", package);
+
+ g_value_init (&value, type);
gperl_value_from_sv (&value, *field_value);
gst_structure_set_value (structure, SvGChar (*field_name), &value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]