Re: [PATCH] [RFC] fixes for guile-1.8
Bill Nottingham [EMAIL PROTECTED] writes: Derek Atkins ([EMAIL PROTECTED]) said: Quoting Bill Nottingham [EMAIL PROTECTED]: Derek Atkins ([EMAIL PROTECTED]) said: Thanks! BTW, Miroslav Lichvar ([EMAIL PROTECTED]) is the originator of this patch, just to get the attribution right. Oh. Too late. Already attributed it to you. ;) Looks like src/import-export/qif-io-core/qif-parse.scm needs the same fix. r13989. Bill -derek -- Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory Member, MIT Student Information Processing Board (SIPB) URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH [EMAIL PROTECTED]PGP key available ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
[PATCH] [RFC] fixes for guile-1.8
It still spews a huge pile of warnings on startup that I haven't tracked down yet, but this is the start of some work to get gnucash going with guile-1.8. What this patch changes: qif-parse.scm: Fixes: ERROR: In procedure scm_lreadr: ERROR: /usr/src/build/746034-x86_64/BUILD/gnucash-1.9.5/intl-scm/../src/import-export/qif-import/qif-parse.scm:9:50: illegal character in escape sequence: #\| make[2]: *** [guile-strings.c] Error 1 during build. engine-helpers.c: scm_block_gc no longer exists in guile-1.8. The engine-helpers.c probably needs wrapped in a version-check, which is why this is a RFC... Bill --- gnucash-1.9.5/src/engine/engine-helpers.c.foo 2006-05-09 17:08:56.0 -0400 +++ gnucash-1.9.5/src/engine/engine-helpers.c 2006-05-09 17:09:05.0 -0400 @@ -1686,8 +1686,6 @@ if (!q) return SCM_BOOL_F; - ++scm_block_gc; - /* terms */ pair = scm_cons (gnc_query_terms2scm (qof_query_get_terms (q)), SCM_EOL); pair = scm_cons (scm_str2symbol (terms), pair); @@ -1723,7 +1721,6 @@ /* Reverse this list; tag it as 'query-v2' */ pair = scm_reverse (query_scm); - --scm_block_gc; return scm_cons (scm_str2symbol (query-v2), pair); } @@ -1928,8 +1925,6 @@ gboolean si1 = TRUE, si2 = TRUE, si3 = TRUE; int max_results = -1; - ++scm_block_gc; - while (!SCM_NULLP (query_scm)) { const gchar *symbol; @@ -2008,8 +2003,6 @@ } } - --scm_block_gc; - if (ok search_for) { qof_query_search_for (q, search_for); qof_query_set_sort_order (q, sp1, sp2, sp3); --- gnucash-1.8.12/src/import-export/qif-import/qif-parse.scm.guile18 2006-03-16 12:56:35.0 +0100 +++ gnucash-1.8.12/src/import-export/qif-import/qif-parse.scm 2006-03-16 12:56:43.0 +0100 @@ -7,7 +7,7 @@ ; (define qif-category-compiled-rexp - (make-regexp ^ *(\\[)?([^]/\\|]*)(]?)(/?)([^\|]*)(\\|(\\[)?([^]/]*)(]?)(/?)(.*))? *$)) + (make-regexp ^ *(\\[)?([^]/\\|]*)(]?)(/?)([^\\|]*)(\\|(\\[)?([^]/]*)(]?)(/?)(.*))? *$)) (define qif-date-compiled-rexp (make-regexp ^ *([0-9]+) *[-/.'] *([0-9]+) *[-/.'] *([0-9]+).*$|^ *([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]).*$)) ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [PATCH] [RFC] fixes for guile-1.8
Quoting Bill Nottingham [EMAIL PROTECTED]: It still spews a huge pile of warnings on startup that I haven't tracked down yet, but this is the start of some work to get gnucash going with guile-1.8. What this patch changes: qif-parse.scm: Fixes: ERROR: In procedure scm_lreadr: ERROR: /usr/src/build/746034-x86_64/BUILD/gnucash-1.9.5/intl-scm/../src/import-export/qif-import/qif-parse.scm:9:50: illegal character in escape sequence: #\| make[2]: *** [guile-strings.c] Error 1 during build. Ahh, thank you for this!! Someone else reported this and, well, I just didn't see the problem. (sometimes I hate regex!) Yeah, this one can (and should) be committed. Indeed I'll go do that shortly.. engine-helpers.c: scm_block_gc no longer exists in guile-1.8. The engine-helpers.c probably needs wrapped in a version-check, which is why this is a RFC... Yeah, this is a bit more of a problem. This particular operation can really beat on the guile garbage collector. Does guile 1.8 have some API we could use to manually turn the garbage collection on and off? With the GC on it's a huge performance hit during these particular operations. So I'd really prefer not to just outright remove this if we can find some other way to do what we want. Bill Thanks! -derek -- Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory Member, MIT Student Information Processing Board (SIPB) URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH [EMAIL PROTECTED]PGP key available ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [PATCH] [RFC] fixes for guile-1.8
Derek Atkins ([EMAIL PROTECTED]) said: engine-helpers.c: scm_block_gc no longer exists in guile-1.8. The engine-helpers.c probably needs wrapped in a version-check, which is why this is a RFC... Yeah, this is a bit more of a problem. This particular operation can really beat on the guile garbage collector. Does guile 1.8 have some API we could use to manually turn the garbage collection on and off? With the GC on it's a huge performance hit during these particular operations. So I'd really prefer not to just outright remove this if we can find some other way to do what we want. In the NEWS file of guile-1.8.0: ** The GC can no longer be blocked. The global flags scm_gc_heap_lock and scm_block_gc have been removed. The GC can now run (partially) concurrently with other code and thus blocking it is not well defined. So, I'd read that as 'no'. (I'm in no way an expert on guile internals.) Bill ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [PATCH] [RFC] fixes for guile-1.8
Derek Atkins ([EMAIL PROTECTED]) said: Thanks! BTW, Miroslav Lichvar ([EMAIL PROTECTED]) is the originator of this patch, just to get the attribution right. Bill ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [PATCH] [RFC] fixes for guile-1.8
Quoting Bill Nottingham [EMAIL PROTECTED]: In the NEWS file of guile-1.8.0: ** The GC can no longer be blocked. The global flags scm_gc_heap_lock and scm_block_gc have been removed. The GC can now run (partially) concurrently with other code and thus blocking it is not well defined. So, I'd read that as 'no'. (I'm in no way an expert on guile internals.) Yeah, I'm not an expert, either. From reading that note I would suspect that the reasons we tried to block the GC aren't /as/ relevent in 1.8.. So perhaps a guile-version-based compile-time flag would be appropriate. I know at build-time if we've got 1.6 or 1.8, so we can just put those blocks within #ifdef GUILE_BLOCK_GC and define /that/ based on a configure test. Bill -derek -- Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory Member, MIT Student Information Processing Board (SIPB) URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH [EMAIL PROTECTED]PGP key available ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [PATCH] [RFC] fixes for guile-1.8
Derek Atkins ([EMAIL PROTECTED]) said: Quoting Bill Nottingham [EMAIL PROTECTED]: Derek Atkins ([EMAIL PROTECTED]) said: Thanks! BTW, Miroslav Lichvar ([EMAIL PROTECTED]) is the originator of this patch, just to get the attribution right. Oh. Too late. Already attributed it to you. ;) Looks like src/import-export/qif-io-core/qif-parse.scm needs the same fix. Bill ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel