Commit 15b6cfc4 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

if a generated file in libgimp contains deprecated procedures, #undef

2006-10-31  Michael Natterer  <mitch@gimp.org>

	* 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.
parent 6ff59cec
2006-10-31 Michael Natterer <mitch@gimp.org>
* 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 <sven@gimp.org>
* plug-ins/pygimp/plug-ins/py-slice.py: string fixes.
......
......@@ -26,6 +26,9 @@
#include <string.h>
#include "gimp.h"
#undef GIMP_DISABLE_DEPRECATED
#undef __GIMP_BRUSHES_PDB_H__
#include "gimpbrushes_pdb.h"
/**
* gimp_brushes_refresh:
......
......@@ -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:
......
......@@ -26,6 +26,9 @@
#include <string.h>
#include "gimp.h"
#undef GIMP_DISABLE_DEPRECATED
#undef __GIMP_DRAWABLE_PDB_H__
#include "gimpdrawable_pdb.h"
/**
* gimp_drawable_delete:
......
......@@ -26,6 +26,9 @@
#include <string.h>
#include "gimp.h"
#undef GIMP_DISABLE_DEPRECATED
#undef __GIMP_GRADIENTS_PDB_H__
#include "gimpgradients_pdb.h"
/**
* gimp_gradients_refresh:
......
......@@ -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:
......
......@@ -26,6 +26,9 @@
#include <string.h>
#include "gimp.h"
#undef GIMP_DISABLE_DEPRECATED
#undef __GIMP_PATHS_PDB_H__
#include "gimppaths_pdb.h"
/**
* gimp_path_list:
......
......@@ -26,6 +26,9 @@
#include <string.h>
#include "gimp.h"
#undef GIMP_DISABLE_DEPRECATED
#undef __GIMP_PATTERNS_PDB_H__
#include "gimppatterns_pdb.h"
/**
* gimp_patterns_refresh:
......
......@@ -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:
......
......@@ -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:
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment