Nick Bowler | 31 Mar 03:25
Picon
Gravatar

[PATCH] Don't output #line 0 directives for prototypes.

It is not valid for the integer argument of a #line directive to be 0.
However, the generated C source will contain such a directive around the
prototypes of private functions that do not appear in the .gob file.
For example, the trivial

  class My:Test from G:Object {
  }

generates the invalid C code:

  #line 0 "my-test.gob"
  static void my_test_init (MyTest * o) G_GNUC_UNUSED;
  /* ... */
  #line 0 "my-test.gob"
  static void my_test_class_init (MyTestClass * c) G_GNUC_UNUSED;

Fix this up and add an assertion to out_addline_infile to catch future
problems of this nature.
---

Hopefully this is the right place to send patches!  The gob2 website
doesn't make any mention of where they should be sent.

 src/main.c |    6 ++++--
 src/out.c  |    2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/main.c b/src/main.c
index 5d2d4c9..cd8edef 100644
--- a/src/main.c
(Continue reading)

Dmitri Toubelis | 6 Mar 04:47
Gravatar

Building on ubuntu 10.04 LTS fails

Hi, 

I'm trying to build gob-2.0.18 from source tar ball on Ubuntu 10.04 LTS and it fails with the following
messages: 

dev02:~/src/gob2-2.0.18> ./configure 
checking for a BSD-compatible install... /usr/bin/install -c 
checking whether build environment is sane... yes 
checking for a thread-safe mkdir -p... /bin/mkdir -p 
checking for gawk... gawk 
checking whether make sets $(MAKE)... yes 
checking whether to enable maintainer-specific portions of Makefiles... no 
checking for style of include used by make... GNU 
checking for gcc... gcc 
checking whether the C compiler works... yes 
checking for C compiler default output file name... a.out 
checking for suffix of executables... 
checking whether we are cross compiling... no 
checking for suffix of object files... o 
checking whether we are using the GNU C compiler... yes 
checking whether gcc accepts -g... yes 
checking for gcc option to accept ISO C89... none needed 
checking dependency style of gcc... gcc3 
checking for library containing strerror... none required 
checking for gcc... (cached) gcc 
checking whether we are using the GNU C compiler... (cached) yes 
checking whether gcc accepts -g... (cached) yes 
checking for gcc option to accept ISO C89... (cached) none needed 
checking dependency style of gcc... (cached) gcc3 
checking how to run the C preprocessor... gcc -E 
(Continue reading)

Jiri Lebl | 6 Jan 20:48
Favicon
Gravatar

ANNOUNCE: gob2 2.0.18 the "bit torture" release

UGUGUFEEEEEEEEEEEEEEEEEEEEEEEEEE

Perfection can always be improved: Time for a new gob version.

So what is this gob thing?  Well besides being the cure for cancer, it also
generates GObjects (or GTK+ objects).  GOB2 is a replacement for the version
1 GOB, that was for GTK+ 1.x mostly.  GOB2 can handle pretty much most of the
GObject features.  At least most of the ones that anyone will ever use.  It
only requires GLib 2.0 (or higher for some features) and can generate
arbitrary GObjects.  You can have both versions installed at the same time if
you wish, but if anyone is still using gob version 1 and GTK+ 1.x, they
should get their head examined.

Here are the news in 2.0.18:

	* Add %ctop{ %} to do what alltop does but only for the C file
	* Buildfixes for Cygwin (Roland Clobus)
	* gob2.m4 exits if gob is not found (fixes ubuntu #317801)
          (Stephen Kitt)
	* Escape minus signs in the webpage and fix some typos (Stephen Kitt)
	* clarify README as to the public domainness of the generated code

ftp://ftp.5z.com/pub/gob/
http://ftp.gnome.org/pub/GNOME/sources/gob2/2.0/
http://www.5z.com/jirka/gob.html

Note: I no longer have fedora, so no rpms are built but the specfile is
included.  Try it with "rpmbuild -ta gob2-...-tar.gz"

Have fun,
(Continue reading)

Dmitri Toubelis | 30 Dec 18:12
Gravatar

Need for %ctop{ %}

Hi, 

I'm new to this list but I was using GOB with autotools for several years now. GOB is a excellent tool and it is
saved us a lot of time. However, all this time I was having intermittent problems with our builds. I was
fixing these problems by adding temporary hacks to a standard autotool's build process. Finally I had
some time to investigate them properly and here is my observations: 

- We use autotools to generate config.h file that needs to be included as a first thing in *.c files.

- I would normally put it at the top of %{ %} section but then I was having problems and in particular with large
file support that didn't work on GOB generated files and worked flawlessly on manually created ones. 

- It appears that top of %{ %} section does not translate to the top of corresponding *.c file and GOB includes
its headers before this point when it is too late for config.h.

- To prove my suspicion I tried to include config.h in %alltop{ %} section and it worked alright. However,
config.h should not be used in any of headers especially in public ones and it have to only be included just
once at the top in each of *.c files. 

So, does anyone came across same problem before? If so, are there any reasonable workarounds out there?
Otherwise, can we talk about adding this feature to GOB?

Regards, 
Dmitri 

--
to unsubscribe:
send mail to minimalist <at> 5z.com with "unsubscribe gob-list" in the subject

(Continue reading)

Roland Clobus | 7 Oct 20:23
Picon

Build gob2 on Cygwin

Hello,

Here is a patch that allow gob2 to be built on Cygwin (the POSIX
compliant shell for Windows). For Cygwin and MinGW each executable gets
the extension .exe, which is appended by the autotools when they
understand the arguments to bin_PROGRAMS.

I've recently started to use gob2 for Pioneers, a clone of the board
game Settlers of Catan (http://pio.sf.net). It's really easy to create
new classes with gob2.

With kind regards,
Roland Clobus
Developer for Pioneers
--- gob2-2.0.17.orig/src/Makefile.am	2009-07-10 21:29:53.000000000 +0200
+++ gob2-2.0.17/src/Makefile.am	2010-10-07 20:01:43.093750000 +0200
@@ -21,9 +21,9 @@
 	-I$(includedir)
 
 if NOINSTGOB
-noinst_PROGRAMS = @NOINSTGOB@
+noinst_PROGRAMS = gob2
 else
-bin_PROGRAMS = @INSTGOB@
+bin_PROGRAMS = gob2
 endif
 EXTRA_PROGRAMS = gob2
 
(Continue reading)

Stephen Kitt | 1 Jun 07:58

New Debian maintainer, patches and licensing

Hi,

I'm adopting gob2 from Mark Brown in Debian. I'm currently preparing an
upload of version 2.0.17, but I have a few questions first.
* The manpage doesn't escape minus signs; does the attached patch seem OK to
  you?
* The m4 macro GOB2_CHECK only issues a warning if gob2 is not found;
  shouldn't it produce an error? See
  https://bugs.launchpad.net/ubuntu/+source/gob2/+bug/317801 for the source
  of the attached patch.
* The README mentions that generated code is under LGPL, yet
  COPYING.generated-code specifies that it is in the public domain. Which is
  correct?

I'm also attaching a patch which fixes some typos.

Best regards,

Stephen
Instead of simply warning, produce an error if gob2 is requested but
not present. Patch taken from
https://bugs.launchpad.net/ubuntu/+source/gob2/+bug/317801

--- gob2-2.0.17.orig/gob2.m4
+++ gob2-2.0.17/gob2.m4
@@ -54,5 +54,5 @@
 ])

(Continue reading)

Dan Saul | 26 Mar 02:28
Picon

Gob2 sigfault with dispose

Hello all,


I am having a problem with the GOB2 preprocessor, with a minimal file of:

class Ude:Dock:Debug from G:Object
{
init (self)
{
}
dispose(self)
{
}
}

I am receiving a sigfault when gob is run with the command:

gob2 --always-private-header --always-private-struct -o ./gen/ ../src/ude-dock-debug.gob

I would like to confirm whether this is just me, or if it is a simple mistake i've made?

If I remove the dispose method it works fine, this also happens if I add a finalize method.

Thanks for your time, Dan
--
to unsubscribe:
send mail to minimalist <at> 5z.com with "unsubscribe gob-list" in the subject
Ding Yi Chen | 24 Nov 05:11
Picon
Favicon

Patch for the bug on remove_sep().

Hi,

I am using gob2 to develop various projects such as WritRecogn, ibus-chewing, and MakerDialog.
Recently I found that those project are failed to compile. After investigation, I think the problem 
might reside in remove_sep(), src/util.c.

In remove_sep(), the code that remove ':' is:

	while((p = strchr(s, ':')))
		strcpy(p, p+1);

However, according to the man page of strcpy:
   "The strings may not overlap, and the destination string dest must  be
       large enough to receive the copy."

In fact, this code block produces unexpected results in some systems.
For example:
  Ma:Class is converted to Ma:Clsss
  Ma:Placement is converted to Ma:Plccemnnt

The patch that address this issue is attached.

Regards,
--

-- 
Ding-Yi Chen
Software Engineer
Internationalization Group
Red Hat, Inc.

Register now for Red Hat Virtual Experience, December 9.
Enterprise Linux, virtualization, cloud, and more.
http://www.redhat.com/virtualexperience
Attachment (gob2-remove_sep.patch): application/octet-stream, 489 bytes
--
to unsubscribe:
send mail to minimalist <at> 5z.com with "unsubscribe gob-list" in the subject
Jiri Lebl | 21 Jul 17:44
Favicon
Gravatar

ANNOUNCE: gob2 2.0.16 the "I shot the sheriff" release


UGUGUGOBGOBGOBUGUGUSMOKEUFUFUGANJAEKIEKIWEEDUMFOOOOOOOOOOOOOOOOOOOO

Apparently perfection was not yet perfect (read last anouncement).  Anyway,
it is time for a new gob.  No new major bug fixes or anything.  Mosty
application and in some cases reworking of pending patches.  It is true that
some users have suffered great mental anguish because of gob.  Their pain is
not going away, because here is a new release of gob.

So what is this gob thing?  Well besides being the cure for cancer, it also
generates GObjects (or GTK+ objects).  GOB2 is a replacement for the version
1 GOB, that was for GTK+ 1.x mostly.  GOB2 can handle pretty much most of the
GObject features.  At least most of the ones that anyone will ever use.  It
only requires GLib 2.0 (or higher for some features) and can generate
arbitrary GObjects.  You can have both versions installed at the same time if
you wish, but if anyone is still using gob version 1 and GTK+ 1.x, they
should get their head examined.

Here are the news in 2.0.16:

	* add possibility of using function attributes such as
	  G_GNUC_PRINTF etc... (Britton Kerin, Jean-Yves Lefort, me)
	* *_get_type methods are G_GNUC_CONST (Jean-Yves Lefort, me)
	* move #line sections past opening brace of functions
	  (Jean-Yves Lefort)
	* handle finalize, dispose, constructor just like init
	  (Jean-Yves Lefort)
	* Add %afterdecls{ %} code block
	  (Jean-Yves Lefort)
	* Minor fixes to docs (me, Andrew Feren)

ftp://ftp.5z.com/pub/gob/
http://ftp.gnome.org/pub/GNOME/sources/gob2/2.0/
http://www.5z.com/jirka/gob.html

Note: I no longer have fedora, so no rpms are built but the specfile is
included.  Try it with "rpmbuild -ta gob2-...-tar.gz"

Have fun,

George

--

-- 
Jiri (George) Lebl http://www.jirka.org/
   The only thing that interferes with my learning is my education.
                       -- Albert Einstein

--
to unsubscribe:
send mail to minimalist <at> 5z.com with "unsubscribe gob-list" in the subject

Jiri Lebl | 10 Jul 21:52
Favicon
Gravatar

new version coming soon

So it took a long time, but I've spent the whole day today fixing up the 
waiting patches for gob.  Anyway, instead of just making a release, I want to 
make sure things work.

A TEST tarball release is at http://www.jirka.org/gob2-2.0.16-test.tar.gz

Let me know if it works or doesn't work.  If it all does work, I'll make a 
release in a few days.

See the NEWS file and ChangeLog to see what I did.

One thing of note is how I handled the function attributes.  I erred on the 
side of as little code change as possible and on the side of as little change 
to syntax as possible.  I took Britton's patch, and then I realized it would 
not be easy to handle the syntax in that way (though it looked nicer). 
Jean-Yves patch was more flexible but I didn't like the fact that it 
introduced new syntax.  So I opted to just handle it like onerror and 
defreturn so that essentially no new looking syntax is created.  So you do

public void
print (self, const char *format (check null), ...) attr {G_GNUC_PRINTF(2, 3)}

Somewhat uglier, yes, but more flexible and doesn't add new syntax, does not 
touch the lexer, and is minimally code invasive.

Sorry about the long wait ...

Jiri

--

-- 
George <jirka <at> 5z.com>
    I killed the cat.   -- Sid Vicious

--
to unsubscribe:
send mail to minimalist <at> 5z.com with "unsubscribe gob-list" in the subject

Jiri Lebl | 8 Jul 00:48
Favicon
Gravatar

Re: Friendly poke on gob2

Richard Schwarting wrote:
> Hello.
> 
> Thanks for the work you've already put into gob2.  I was wondering
> whether you were still planning on pushing a new release including the
> patches pending on the list.
> 
> Cheers,
>   Richard

I am planning on doing it.  I think I will actually do it in the next few 
weeks since I finally have some free time for the rest of july.

If there is someone on the list who thinks they can do a better job of 
updating gob (perhaps implementing some newer features of gobject or some 
things that were not yet finished (e.g. interfaces)), speak up.  Else it's up 
to me and it's really a backburner kind of project for me (though it really 
doesn't require too much more than a backburner kind of attention IMO).

Jiri

--
to unsubscribe:
send mail to minimalist <at> 5z.com with "unsubscribe gob-list" in the subject


Gmane