com gtk/php-gtk: I believe this should resolve the circular include problem.: ext/gtk+/config.m4 ext/gtk+/php_gtk+.h ext/libg lade/Makefile.frag generator/generator.php main/php_g tk_api.h

[email protected] (David Soria Parra) Thu, 06 Oct 2005 07:03:14 +0000
Newsgroups php.gtk.cvs
Message-ID <[email protected]>
Commit:    8543e48464fec6713c29917e4a7f299afebad9e7=0AAuthor:    Andrei Zmi=
evski <[email protected]>         Thu, 6 Oct 2005 07:03:14 +0000=0AParents:   =
9a11e72e3e24d246d815847eec6acb829dd9738e=0ABranches:  master=0A=0ALink:    =
   http://git.php.net/?p=3Dgtk/php-gtk.git;a=3Dcommitdiff;h=3D8543e48464fec=
6713c29917e4a7f299afebad9e7=0A=0ALog:=0AI believe this should resolve the c=
ircular include problem.=0A=0AChanged paths:=0A  M  ext/gtk+/config.m4=0A  =
M  ext/gtk+/php_gtk+.h=0A  M  ext/libglade/Makefile.frag=0A  M  generator/g=
enerator.php=0A  A  main/php_gtk_api.h=0A=0A=0ADiff:=0A8543e48464fec6713c29=
917e4a7f299afebad9e7=0Adiff --git a/ext/gtk+/config.m4 b/ext/gtk+/config.m4=
=0Aindex e3480f5..7b55021 100644=0A--- a/ext/gtk+/config.m4=0A+++ b/ext/gtk=
+/config.m4=0A@@ -28,4 +28,4 @@ PHP_EVAL_LIBLINE($PANGO_LIBS, PHP_GTK2_SHAR=
ED_LIBADD)=0A =0A PHP_SUBST(PHP_GTK2_SHARED_LIBADD)=0A =0A-PHP_GTK_EXTENSIO=
N([gtk+], no, [gen_atk.c gen_pango.c gen_gdk.c gen_gtk.c php_gtk+.c php_gtk=
+_types.c])=0A+PHP_GTK_EXTENSION([gtk+], no, [php_gtk+.c php_gtk+_types.c],=
 [gen_atk.c gen_pango.c gen_gdk.c gen_gtk.c])=0Adiff --git a/ext/gtk+/php_g=
tk+.h b/ext/gtk+/php_gtk+.h=0Aindex d9ca51c..9e17ac7 100644=0A--- a/ext/gtk=
+/php_gtk+.h=0A+++ b/ext/gtk+/php_gtk+.h=0A@@ -49,8 +49,6 @@ void phpg_gtk_=
register_classes(void);=0A =0A void php_gtk_plus_register_types();=0A =0A-#=
include "gen_gtk.h"=0A-=0A #if 0=0A PHP_GTK_API extern int le_gtk_object;=
=0A PHP_GTK_API extern int le_php_gtk_wrapper;=0Adiff --git a/ext/libglade/=
Makefile.frag b/ext/libglade/Makefile.frag=0Aindex d375d96..7eb4e19 100644=
=0A--- a/ext/libglade/Makefile.frag=0A+++ b/ext/libglade/Makefile.frag=0A@@=
 -1,9 +1,14 @@=0A =0A-$(builddir)/php_libglade.lo: $(builddir)/gen_ce_libgl=
ade.h=0A-=0A $(builddir)/gen_libglade.c: $(srcdir)/libglade.defs $(srcdir)/=
libglade.overrides=0A-=09$(PHP) -f $(top_srcdir)/generator/generator.php --=
 -o $(srcdir)/libglade.overrides -p libglade -r $(top_srcdir)/ext/gtk%2b/gt=
k.defs $(srcdir)/libglade.defs > $@=0A-=0A-$(builddir)/gen_ce_libglade.h: $=
(builddir)/gen_libglade.c=0A-=09grep -h "^PHP_GTK_EXPORT_CE" $(srcdir)/gen_=
libglade.c | sed -e "s!^!extern !" > $@=0A-=0A+=09( \=0A+     $(PHP) $(top_=
srcdir)/generator/generator.php \=0A+=09 =09-l $(@D)/gen_$(*F).log \=0A+   =
     -r ext/gtk+/atk-types.defs   \=0A+        -r ext/gtk+/pango-types.defs=
 \=0A+        -r ext/gtk+/gdk-types.defs   \=0A+        -r ext/gtk+/gtk-typ=
es.defs   \=0A+        -o ext/libglade/libglade.overrides \=0A+        -p G=
lade \=0A+        -f $@ ext/libglade/libglade.defs \=0A+     && grep -h "^P=
HP_GTK_EXPORT_CE" $@ | sed -e "s!^!extern !" > $(@D)/gen_$(*F).h \=0A+=09)=
=0Adiff --git a/generator/generator.php b/generator/generator.php=0Aindex 7=
1a14a8..5f7ec45 100644=0A--- a/generator/generator.php=0A+++ b/generator/ge=
nerator.php=0A@@ -909,7 +909,8 @@ class Generator {=0A         $this->log_p=
rint($this->make_header("$this->prefix Summary"));=0A =0A         $this->fp=
 =3D new LineOutput(fopen($savefile, 'w'), $savefile);=0A-        $this->fp=
->write("#include \"php_gtk.h\"");=0A+        $this->fp->write("#include \"=
php_gtk.h\"\n");=0A+        $this->fp->write("#include \"php_gtk_api.h\"\n"=
);=0A         $this->fp->write("\n#if HAVE_PHP_GTK\n");=0A         $this->f=
p->write($this->overrides->get_headers());=0A         $this->write_class_en=
tries();=0Adiff --git a/main/php_gtk_api.h b/main/php_gtk_api.h=0Anew file =
mode 100644=0Aindex 0000000..57c0990=0A--- /dev/null=0A+++ b/main/php_gtk_a=
pi.h=0A@@ -0,0 +1,4 @@=0A+#include "ext/gtk+/gen_gtk.h"=0A+#include "ext/gt=
k+/gen_gdk.h"=0A+#include "ext/gtk+/gen_atk.h"=0A+#include "ext/gtk+/gen_pa=
ngo.h"=0A