perl-Glib r1042 - trunk
- From: tsch svn gnome org
- To: svn-commits-list gnome org
- Subject: perl-Glib r1042 - trunk
- Date: Mon, 3 Nov 2008 20:53:00 +0000 (UTC)
Author: tsch
Date: Mon Nov 3 20:53:00 2008
New Revision: 1042
URL: http://svn.gnome.org/viewvc/perl-Glib?rev=1042&view=rev
Log:
Fail loudly and with a clear error message when we encounter an unknown
interface when registering a new type.
Modified:
trunk/ChangeLog
trunk/GType.xs
Modified: trunk/GType.xs
==============================================================================
--- trunk/GType.xs (original)
+++ trunk/GType.xs Mon Nov 3 20:53:00 2008
@@ -1497,10 +1497,18 @@
newSVpv (gperl_object_package_from_type (instance_type), 0);
for (i = 0; i <= av_len (interfaces); i++) {
+ GType interface_type;
+
SV ** svp = av_fetch (interfaces, i, FALSE);
if (!svp || !gperl_sv_is_defined (*svp))
croak ("encountered undefined interface name");
+ interface_type = gperl_object_type_from_package (SvPV_nolen (*svp));
+ if (!interface_type) {
+ croak ("encountered unregistered interface %s",
+ SvPV_nolen (*svp));
+ }
+
/* call the interface's setup function on this class. */
{
dSP;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]