[gob] Mon Mar 29 22:24:29 2010 Jiri (George) Lebl <jirka 5z com>
- From: George Lebl <jirka src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gob] Mon Mar 29 22:24:29 2010 Jiri (George) Lebl <jirka 5z com>
- Date: Tue, 30 Mar 2010 03:46:25 +0000 (UTC)
commit b0c081e42a2b07d4ed85b1bc4084ba3fd83cc971
Author: Jiri (George) Lebl <jirka 5z com>
Date: Mon Mar 29 22:46:04 2010 -0500
Mon Mar 29 22:24:29 2010 Jiri (George) Lebl <jirka 5z com>
* src/lexer.l: deal with \r in the input files
* src/parse.y: Fix segfaults when defining
constructor/finalize/dispose using the new interface from
last version. Should fix debian bug #574542
* src/main.c: Use -G_MAXDOUBLE instead of G_MINDOUBLE and -G_MAXFLOAT
instead of G_MINFLOAT. That's the correct smallest value. Thanks
to Marcel Wagner wagmarcel at web dot de
ChangeLog | 12 ++++++++++++
NEWS | 8 ++++++++
configure.in | 2 +-
src/lexer.l | 7 ++++---
src/main.c | 10 +++++-----
src/parse.y | 13 +++++++++----
6 files changed, 39 insertions(+), 13 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a4d81a9..041f376 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Mon Mar 29 22:24:29 2010 Jiri (George) Lebl <jirka 5z com>
+
+ * src/lexer.l: deal with \r in the input files
+
+ * src/parse.y: Fix segfaults when defining
+ constructor/finalize/dispose using the new interface from
+ last version. Should fix debian bug #574542
+
+ * src/main.c: Use -G_MAXDOUBLE instead of G_MINDOUBLE and -G_MAXFLOAT
+ instead of G_MINFLOAT. That's the correct smallest value. Thanks
+ to Marcel Wagner wagmarcel at web dot de
+
Wed Dec 23 14:02:11 2009 Jiri (George) Lebl <jirka 5z com>
* src/util.c: fix remove_sep to avoid strcpy problems. Patch from
diff --git a/NEWS b/NEWS
index 6a629a1..ebdf093 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,11 @@
+2.0.17:
+ * Fix segfault when defining the finilize, dispose, and
+ constructor methods (Fixes debian bug #574542)
+ * Handle carriage returns in input files
+ * use -G_MAXFLOAT and -G_MAXDOUBLE for the default minima
+ for floating point numbers (thanks to Marcel Wagner for
+ the patch)
+
2.0.16:
* add possibility of using function attributes such as
G_GNUC_PRINTF etc... (Britton Kerin, Jean-Yves Lefort, me)
diff --git a/configure.in b/configure.in
index da4b965..a88ebd1 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.2)
AC_INIT(src/treefuncs.h)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(gob2,2.0.16)
+AM_INIT_AUTOMAKE(gob2,2.0.17)
AM_MAINTAINER_MODE
GLIB_REQUIRED=2.0.0
diff --git a/src/lexer.l b/src/lexer.l
index 0c8ef11..1a58a9c 100644
--- a/src/lexer.l
+++ b/src/lexer.l
@@ -189,7 +189,7 @@ REJECT;
g_free(str);
}
-<C_CODE>^#[ \t]*include[ \t][<"][^\n">]*[>"] {
+<C_CODE>^#[ \t]*include[ \t][<"][^\n\r">]*[>"] {
if(look_for_includes==1) {
char *p;
char *file;
@@ -625,13 +625,14 @@ flags { return FLAGS; }
<CLASS_CODE,CLASS_CODE_I,INITIAL,PROPERTY_CODE,PROPERTY_CODE_I>[\f\t ] ; /*ignore*/
+<*>[\n\r] ; /*ignore*/
+
+
<*>. {
yylval.line = line_no;
return yytext[0];
}
-<*>[\n\r] ; /*ignore*/
-
^[ \t]*prealloc[ \t]+[0-9]+[ \t]*$ {
char *p;
int t;
diff --git a/src/main.c b/src/main.c
index f3142ad..efc2c48 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1613,13 +1613,13 @@ make_argument (Argument *a)
a->name, flags->str);
else if (!strcmp (a->gtktype, "FLOAT"))
out_printf(out, "\tparam_spec = g_param_spec_float (\"%s\", NULL, NULL,\n"
- "\t\tG_MINFLOAT, G_MAXFLOAT,\n"
+ "\t\t-G_MAXFLOAT, G_MAXFLOAT,\n"
"\t\t0,\n"
"\t\t%s);\n",
a->name, flags->str);
else if (!strcmp (a->gtktype, "DOUBLE"))
out_printf(out, "\tparam_spec = g_param_spec_double (\"%s\", NULL, NULL,\n"
- "\t\tG_MINDOUBLE, G_MAXDOUBLE,\n"
+ "\t\t-G_MAXDOUBLE, G_MAXDOUBLE,\n"
"\t\t0,\n"
"\t\t%s);\n",
a->name, flags->str);
@@ -1917,7 +1917,7 @@ make_property (Property *p)
p->name,
value_for_print (p->nick, "NULL"),
value_for_print (p->blurb, "NULL"),
- value_for_print (p->minimum, "G_MINFLOAT"),
+ value_for_print (p->minimum, "-G_MAXFLOAT"),
value_for_print (p->maximum, "G_MAXFLOAT"),
value_for_print (p->default_value, "0.0"),
flags->str);
@@ -1933,7 +1933,7 @@ make_property (Property *p)
p->name,
value_for_print (p->nick, "NULL"),
value_for_print (p->blurb, "NULL"),
- value_for_print (p->minimum, "G_MINDOUBLE"),
+ value_for_print (p->minimum, "-G_MAXDOUBLE"),
value_for_print (p->maximum, "G_MAXDOUBLE"),
value_for_print (p->default_value, "0.0"),
flags->str);
@@ -4516,7 +4516,7 @@ int
main(int argc, char *argv[])
{
parse_options(argc, argv);
-
+
if(use_m4) {
yyin = popen(m4_commandline, "r");
if(!yyin) {
diff --git a/src/parse.y b/src/parse.y
index b8792bb..9c880cf 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -92,9 +92,10 @@ yyerror(char *str)
char *out=NULL;
char *p;
- if(strcmp(yytext,"\n")==0) {
- out=g_strconcat("Error: ",str," before newline",NULL);
- } else if(yytext[0]=='\0') {
+ if (strcmp (yytext, "\n") == 0 ||
+ strcmp (yytext, "\r") == 0) {
+ out = g_strconcat ("Error: ", str, " before end of line", NULL);
+ } else if (yytext[0] == '\0') {
out=g_strconcat("Error: ", str, " at end of input", NULL);
} else {
char *tmp = g_strdup(yytext);
@@ -156,7 +157,11 @@ push_function (int scope, int method, char *oid, char *id,
g_assert(scope != CLASS_SCOPE);
- if(method == INIT_METHOD || method == CLASS_INIT_METHOD) {
+ if(method == INIT_METHOD ||
+ method == CLASS_INIT_METHOD ||
+ method == CONSTRUCTOR_METHOD ||
+ method == DISPOSE_METHOD ||
+ method == FINALIZE_METHOD) {
type = (Type *)node_new (TYPE_NODE,
"name", "void",
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]