Re: [gtk-list] Re: Announce: Gtk-Perl 0.7000 release



On Sun, Jan 02, 2000 at 07:17:13PM +0100, Frank R. Larsen wrote:
> > Hi.
> > Gtk-Perl 0.7000 is available at ftp://ftp.gnome.org/pub/lupus/Gtk-Perl-0.7000.tar.gz.
> > 
> > This release includes months of bugfixes previously available only in
> > gnome cvs, a new build setup to allow for independent compilation
> > of gtk-dependent submodules, more extensive widget support, improved
> > startup time and lower memory usage: check the ChangeLog for more details.
> 
> <whine>It doesn't compile!</whine>
> 
> More specifically I get the following errors when I do "make" in the main 
> dir:
> build/GtkDefs.c:914: redefinition of `names_'
> build/GtkDefs.c:892: `names_' previously defined here

Do you use a threaded perl or a development version?
I just got a report from Bart Schuller that perl has a bug and
doesn't handle ${_}[] properly in quotes. Try the patch attached.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
Index: tools/gendefs.pl
===================================================================
RCS file: /cvs/gnome/gnome-perl/tools/gendefs.pl,v
retrieving revision 1.9
diff -u -r1.9 gendefs.pl
--- tools/gendefs.pl	1999/12/29 18:33:23	1.9
+++ tools/gendefs.pl	2000/01/02 22:17:25
@@ -419,7 +419,7 @@
 	$enum_flags_code_init .= "\t\t$v->{typename} = gtk_type_register_enum(\"$_\", names_$_);\n";
 	$enum_flags_code_incl .= "extern GtkType $v->{typename};\n";
 	$enum_flags_code_decl .= "GtkType $v->{typename};\n";
-	$enum_flags_code_decl .= "static GtkEnumValue names_${_}[] = {\n";
+	$enum_flags_code_decl .= "static GtkEnumValue names_$_"."[] = {\n";
 	foreach $v (@{$enum{$_}->{'values'}}) {
 		 $enum_flags_code_decl .= "\t{$v->{constant}, \"$v->{constant}\", \"$v->{simple}\"},\n";
 	}
@@ -432,11 +432,11 @@
 	next if $flags{$_}->{export};
 	print "Exporting flags: $_\n";
 	$v = $flags{$_};
-	$enum_flags_code_init .= "if (!gtk_type_from_name(\"$_\"))\n";
+	$enum_flags_code_init .= "if (!($v->{typename}=gtk_type_from_name(\"$_\")))\n";
 	$enum_flags_code_init .= "\t\t$v->{typename} = gtk_type_register_flags(\"$_\", names_$_);\n";
 	$enum_flags_code_incl .= "extern GtkType $v->{typename};\n";
 	$enum_flags_code_decl .= "GtkType $v->{typename};\n";
-	$enum_flags_code_decl .= "static GtkEnumValue names_${_}[] = {\n";
+	$enum_flags_code_decl .= "static GtkEnumValue names_$_"."[] = {\n";
 	foreach $v (@{$flags{$_}->{'values'}}) {
 		$enum_flags_code_decl .= "\t{$v->{constant}, \"$v->{constant}\", \"$v->{simple}\"},\n";
 	}
@@ -1239,7 +1239,7 @@
 	print "#ifdef $object{$_}->{cast}\n";
 #	print "\tadd_typecast(", $object{$_}->{prefix}, "_get_type(),	\"$object{$_}->{perlname}\");\n"
 #		;#unless /preview/i;
-	print "\tlink_types(\"$_\",	\"$object{$_}->{perlname}\", 0,	", $object{$_}->{prefix}, "_get_type, sizeof($_), sizeof(${_}Class));\n"
+	print "\tlink_types(\"$_\",	\"$object{$_}->{perlname}\", 0,	", $object{$_}->{prefix}, "_get_type, sizeof($_), sizeof($_"."Class));\n"
 		;#unless /preview/i;
 	print "#endif\n";
 }


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