diff --git a/ChangeLog b/ChangeLog index f67ccd06b5..7d0fded845 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2006-10-31 Michael Natterer + + * tools/pdbgen/lib.pl: if a generated file in libgimp contains + deprecated procedures, #undef GIMP_DISABLE_DEPRECATED and include + its header explicitly, to make sure all deprecated procedures are + declared properly. Removed $privatevars cruft. + + * libgimp/gimpbrushes_pdb.c + * libgimp/gimpcolor_pdb.c + * libgimp/gimpdrawable_pdb.c + * libgimp/gimpgradients_pdb.c + * libgimp/gimppalettes_pdb.c + * libgimp/gimppaths_pdb.c + * libgimp/gimppatterns_pdb.c + * libgimp/gimptexttool_pdb.c + * libgimp/gimptransformtools_pdb.c: regenerated. + 2006-10-31 Sven Neumann * plug-ins/pygimp/plug-ins/py-slice.py: string fixes. diff --git a/libgimp/gimpbrushes_pdb.c b/libgimp/gimpbrushes_pdb.c index a6a52f078f..502375b7b3 100644 --- a/libgimp/gimpbrushes_pdb.c +++ b/libgimp/gimpbrushes_pdb.c @@ -26,6 +26,9 @@ #include #include "gimp.h" +#undef GIMP_DISABLE_DEPRECATED +#undef __GIMP_BRUSHES_PDB_H__ +#include "gimpbrushes_pdb.h" /** * gimp_brushes_refresh: diff --git a/libgimp/gimpcolor_pdb.c b/libgimp/gimpcolor_pdb.c index 59cf336e90..1d22ce3448 100644 --- a/libgimp/gimpcolor_pdb.c +++ b/libgimp/gimpcolor_pdb.c @@ -24,6 +24,9 @@ #include "config.h" #include "gimp.h" +#undef GIMP_DISABLE_DEPRECATED +#undef __GIMP_COLOR_PDB_H__ +#include "gimpcolor_pdb.h" /** * gimp_brightness_contrast: diff --git a/libgimp/gimpdrawable_pdb.c b/libgimp/gimpdrawable_pdb.c index 54ed0c9a31..fb6b5950df 100644 --- a/libgimp/gimpdrawable_pdb.c +++ b/libgimp/gimpdrawable_pdb.c @@ -26,6 +26,9 @@ #include #include "gimp.h" +#undef GIMP_DISABLE_DEPRECATED +#undef __GIMP_DRAWABLE_PDB_H__ +#include "gimpdrawable_pdb.h" /** * gimp_drawable_delete: diff --git a/libgimp/gimpgradients_pdb.c b/libgimp/gimpgradients_pdb.c index fc0b1ab508..21c27ebafd 100644 --- a/libgimp/gimpgradients_pdb.c +++ b/libgimp/gimpgradients_pdb.c @@ -26,6 +26,9 @@ #include #include "gimp.h" +#undef GIMP_DISABLE_DEPRECATED +#undef __GIMP_GRADIENTS_PDB_H__ +#include "gimpgradients_pdb.h" /** * gimp_gradients_refresh: diff --git a/libgimp/gimppalettes_pdb.c b/libgimp/gimppalettes_pdb.c index 0a76e18862..cef45b1c26 100644 --- a/libgimp/gimppalettes_pdb.c +++ b/libgimp/gimppalettes_pdb.c @@ -24,6 +24,9 @@ #include "config.h" #include "gimp.h" +#undef GIMP_DISABLE_DEPRECATED +#undef __GIMP_PALETTES_PDB_H__ +#include "gimppalettes_pdb.h" /** * gimp_palettes_refresh: diff --git a/libgimp/gimppaths_pdb.c b/libgimp/gimppaths_pdb.c index d70a98eb4e..79378abb79 100644 --- a/libgimp/gimppaths_pdb.c +++ b/libgimp/gimppaths_pdb.c @@ -26,6 +26,9 @@ #include #include "gimp.h" +#undef GIMP_DISABLE_DEPRECATED +#undef __GIMP_PATHS_PDB_H__ +#include "gimppaths_pdb.h" /** * gimp_path_list: diff --git a/libgimp/gimppatterns_pdb.c b/libgimp/gimppatterns_pdb.c index c448229af1..01da040b57 100644 --- a/libgimp/gimppatterns_pdb.c +++ b/libgimp/gimppatterns_pdb.c @@ -26,6 +26,9 @@ #include #include "gimp.h" +#undef GIMP_DISABLE_DEPRECATED +#undef __GIMP_PATTERNS_PDB_H__ +#include "gimppatterns_pdb.h" /** * gimp_patterns_refresh: diff --git a/libgimp/gimptexttool_pdb.c b/libgimp/gimptexttool_pdb.c index 967dde3bd4..3e0a900ee6 100644 --- a/libgimp/gimptexttool_pdb.c +++ b/libgimp/gimptexttool_pdb.c @@ -24,6 +24,9 @@ #include "config.h" #include "gimp.h" +#undef GIMP_DISABLE_DEPRECATED +#undef __GIMP_TEXT_TOOL_PDB_H__ +#include "gimptexttool_pdb.h" /** * gimp_text_fontname: diff --git a/libgimp/gimptransformtools_pdb.c b/libgimp/gimptransformtools_pdb.c index b0bed1820f..61bfbdb80d 100644 --- a/libgimp/gimptransformtools_pdb.c +++ b/libgimp/gimptransformtools_pdb.c @@ -24,6 +24,9 @@ #include "config.h" #include "gimp.h" +#undef GIMP_DISABLE_DEPRECATED +#undef __GIMP_TRANSFORM_TOOLS_PDB_H__ +#include "gimptransformtools_pdb.h" /** * gimp_flip: diff --git a/tools/pdbgen/lib.pl b/tools/pdbgen/lib.pl index c573c5ea43..67688eb323 100644 --- a/tools/pdbgen/lib.pl +++ b/tools/pdbgen/lib.pl @@ -88,6 +88,7 @@ sub generate { if ($proc->{deprecated} && !$out->{deprecated}) { push @{$out->{protos}}, "#ifndef GIMP_DISABLE_DEPRECATED\n"; $out->{deprecated} = 1; + $out->{seen_deprecated} = 1; } elsif (!$proc->{deprecated} && $out->{deprecated}) { push @{$out->{protos}}, "#endif /* GIMP_DISABLE_DEPRECATED */\n"; @@ -125,7 +126,7 @@ sub generate { } # The parameters to the function - my $arglist = ""; my $argpass = ""; my $privatevars = 0; + my $arglist = ""; my $argpass = ""; my $argdesc = ""; my $sincedesc = ""; foreach (@inargs) { my ($type) = &arg_parse($_->{type}); @@ -651,7 +652,11 @@ HEADER print CFILE qq/#include "config.h"\n\n/; print CFILE $out->{headers}, "\n" if exists $out->{headers}; print CFILE qq/#include "gimp.h"\n/; - print CFILE qq/#include "gimpprivate.h"\n/ if $privatevars; + if ($out->{seen_deprecated}) { + print CFILE "#undef GIMP_DISABLE_DEPRECATED\n"; + print CFILE "#undef __GIMP_\U$group\E_PDB_H__\n"; + print CFILE qq/#include "${hname}"\n/; + } print CFILE "\n", $extra->{code} if exists $extra->{code}; print CFILE $out->{code}; close CFILE;