lucy-clownfish git commit: Fix TestUtils_time with 32-bit time_t

2016-04-14 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/master 00acd7c12 -> 116a44fe1


Fix TestUtils_time with 32-bit time_t

tv_sec must be converted to uint64_t before the multiplication.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/116a44fe
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/116a44fe
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/116a44fe

Branch: refs/heads/master
Commit: 116a44fe19411862285a0b0d20be3970b3ed7113
Parents: 00acd7c
Author: Nick Wellnhofer 
Authored: Thu Apr 14 14:47:05 2016 +0200
Committer: Nick Wellnhofer 
Committed: Thu Apr 14 14:47:05 2016 +0200

--
 runtime/core/Clownfish/TestHarness/TestUtils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/116a44fe/runtime/core/Clownfish/TestHarness/TestUtils.c
--
diff --git a/runtime/core/Clownfish/TestHarness/TestUtils.c 
b/runtime/core/Clownfish/TestHarness/TestUtils.c
index 556d301..38301d3 100644
--- a/runtime/core/Clownfish/TestHarness/TestUtils.c
+++ b/runtime/core/Clownfish/TestHarness/TestUtils.c
@@ -148,7 +148,7 @@ TestUtils_time() {
 struct timeval t;
 gettimeofday(, NULL);
 
-return (uint64_t)(t.tv_sec * 100 + t.tv_usec);
+return (uint64_t)t.tv_sec * 100 + (uint64_t)t.tv_usec;
 }
 
 #else



lucy-clownfish git commit: Change timestamp in write_if_changed test

2016-04-09 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/master e4a94bca5 -> 00acd7c12


Change timestamp in write_if_changed test

Might fix CLOWNFISH-68.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/00acd7c1
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/00acd7c1
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/00acd7c1

Branch: refs/heads/master
Commit: 00acd7c121edc9ed58a630215d307731ead76c91
Parents: e4a94bc
Author: Nick Wellnhofer 
Authored: Sat Apr 9 15:31:39 2016 +0200
Committer: Nick Wellnhofer 
Committed: Sat Apr 9 15:31:39 2016 +0200

--
 compiler/perl/t/001-util.t | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/00acd7c1/compiler/perl/t/001-util.t
--
diff --git a/compiler/perl/t/001-util.t b/compiler/perl/t/001-util.t
index 745bb69..57f1494 100644
--- a/compiler/perl/t/001-util.t
+++ b/compiler/perl/t/001-util.t
@@ -39,14 +39,14 @@ ok( !current( $foo_txt, "nonexistent_file" ),
 "not current when dest file mising"
 );
 
-my $one_second_ago = time() - 1;
-utime( $one_second_ago, $one_second_ago, $foo_txt )
+my $ten_seconds_ago = time() - 10;
+utime( $ten_seconds_ago, $ten_seconds_ago, $foo_txt )
 or die "utime failed";
 write_if_changed( $foo_txt, "foo" );
-is( stat($foo_txt)->mtime, $one_second_ago,
+is( stat($foo_txt)->mtime, $ten_seconds_ago,
 "write_if_changed does nothing if contents not changed" );
 write_if_changed( $foo_txt, "foofoo" );
-ok( stat($foo_txt)->mtime != $one_second_ago,
+ok( stat($foo_txt)->mtime != $ten_seconds_ago,
 "write_if_changed writes if contents changed"
 );
 



lucy-clownfish git commit: Change timestamp in write_if_changed test

2016-04-09 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/0.5 cf9d70341 -> 0ff0d586d


Change timestamp in write_if_changed test

Might fix CLOWNFISH-68.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/0ff0d586
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/0ff0d586
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/0ff0d586

Branch: refs/heads/0.5
Commit: 0ff0d586dc98523df9d58f72c53f91ea49946ba3
Parents: cf9d703
Author: Nick Wellnhofer 
Authored: Sat Apr 9 15:31:39 2016 +0200
Committer: Nick Wellnhofer 
Committed: Sat Apr 9 15:37:46 2016 +0200

--
 compiler/perl/t/001-util.t | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/0ff0d586/compiler/perl/t/001-util.t
--
diff --git a/compiler/perl/t/001-util.t b/compiler/perl/t/001-util.t
index 745bb69..57f1494 100644
--- a/compiler/perl/t/001-util.t
+++ b/compiler/perl/t/001-util.t
@@ -39,14 +39,14 @@ ok( !current( $foo_txt, "nonexistent_file" ),
 "not current when dest file mising"
 );
 
-my $one_second_ago = time() - 1;
-utime( $one_second_ago, $one_second_ago, $foo_txt )
+my $ten_seconds_ago = time() - 10;
+utime( $ten_seconds_ago, $ten_seconds_ago, $foo_txt )
 or die "utime failed";
 write_if_changed( $foo_txt, "foo" );
-is( stat($foo_txt)->mtime, $one_second_ago,
+is( stat($foo_txt)->mtime, $ten_seconds_ago,
 "write_if_changed does nothing if contents not changed" );
 write_if_changed( $foo_txt, "foofoo" );
-ok( stat($foo_txt)->mtime != $one_second_ago,
+ok( stat($foo_txt)->mtime != $ten_seconds_ago,
 "write_if_changed writes if contents changed"
 );
 



[3/5] lucy-clownfish git commit: Check code point range in Str_BaseX_To_I64

2016-04-09 Thread nwellnhof
Check code point range in Str_BaseX_To_I64

Avoid undefined behavior when calling ctype.h functions.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/8e136eda
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/8e136eda
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/8e136eda

Branch: refs/heads/master
Commit: 8e136edacf5e531101e8bbf165fe7a8b1e005264
Parents: a6bfd28
Author: Nick Wellnhofer 
Authored: Wed Apr 6 13:29:23 2016 +0200
Committer: Nick Wellnhofer 
Committed: Wed Apr 6 13:29:23 2016 +0200

--
 runtime/core/Clownfish/String.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/8e136eda/runtime/core/Clownfish/String.c
--
diff --git a/runtime/core/Clownfish/String.c b/runtime/core/Clownfish/String.c
index f619673..633aa80 100644
--- a/runtime/core/Clownfish/String.c
+++ b/runtime/core/Clownfish/String.c
@@ -243,7 +243,7 @@ Str_BaseX_To_I64_IMP(String *self, uint32_t base) {
 
 // Accumulate.
 while (code_point != STR_OOB) {
-if (isalnum(code_point)) {
+if (code_point <= 127 && isalnum(code_point)) {
 int32_t addend = isdigit(code_point)
  ? code_point - '0'
  : tolower(code_point) - 'a' + 10;



[1/5] lucy-clownfish git commit: Add safe ctype.h wrappers

2016-04-09 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/master bd503cb73 -> e4a94bca5


Add safe ctype.h wrappers

>From the C99 spec:

The header  declares several functions useful for
classifying and mapping characters. In all cases the argument is an
int, the value of which shall be representable as an unsigned char
or shall equal the value of the macro EOF. If the argument has any
other value, the behavior is undefined.

The behavior of these functions is affected by the current locale.

Implementations using a superset of ASCII are assumed.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/fb28c3c8
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/fb28c3c8
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/fb28c3c8

Branch: refs/heads/master
Commit: fb28c3c8c707a6c289553a7480922134bfb0e110
Parents: 658d118
Author: Nick Wellnhofer 
Authored: Wed Apr 6 13:03:44 2016 +0200
Committer: Nick Wellnhofer 
Committed: Wed Apr 6 13:03:44 2016 +0200

--
 compiler/src/CFCUtil.c | 49 +
 compiler/src/CFCUtil.h | 27 +
 2 files changed, 76 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/fb28c3c8/compiler/src/CFCUtil.c
--
diff --git a/compiler/src/CFCUtil.c b/compiler/src/CFCUtil.c
index f505cac..83c30e2 100644
--- a/compiler/src/CFCUtil.c
+++ b/compiler/src/CFCUtil.c
@@ -308,6 +308,55 @@ CFCUtil_wrapped_free(void *ptr) {
 free(ptr);
 }
 
+// Avoid -Wtype-limits warning.
+#if CHAR_MAX <= 127
+  #define IS_ASCII(c) ((c) >= 0)
+#else
+  #define IS_ASCII(c) ((c) >= 0 && (c) <= 127)
+#endif
+
+int
+CFCUtil_isalnum(char c) {
+return IS_ASCII(c) && isalnum(c);
+}
+
+int
+CFCUtil_isalpha(char c) {
+return IS_ASCII(c) && isalpha(c);
+}
+
+int
+CFCUtil_isdigit(char c) {
+return IS_ASCII(c) && isdigit(c);
+}
+
+int
+CFCUtil_islower(char c) {
+return IS_ASCII(c) && islower(c);
+}
+
+int
+CFCUtil_isspace(char c) {
+return IS_ASCII(c) && isspace(c);
+}
+
+int
+CFCUtil_isupper(char c) {
+return IS_ASCII(c) && isupper(c);
+}
+
+char
+CFCUtil_tolower(char c) {
+if (!IS_ASCII(c)) { return c; }
+return (char)tolower(c);
+}
+
+char
+CFCUtil_toupper(char c) {
+if (!IS_ASCII(c)) { return c; }
+return (char)toupper(c);
+}
+
 int
 CFCUtil_current(const char *orig, const char *dest) {
 // If the destination file doesn't exist, we're not current.

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/fb28c3c8/compiler/src/CFCUtil.h
--
diff --git a/compiler/src/CFCUtil.h b/compiler/src/CFCUtil.h
index 73286ef..ea66400 100644
--- a/compiler/src/CFCUtil.h
+++ b/compiler/src/CFCUtil.h
@@ -153,6 +153,33 @@ CFCUtil_wrapped_free(void *ptr);
 #define FREEMEM(_ptr) \
 CFCUtil_wrapped_free(_ptr)
 
+/** Safe wrappers for ctype.h functions.
+ */
+
+int
+CFCUtil_isalnum(char c);
+
+int
+CFCUtil_isalpha(char c);
+
+int
+CFCUtil_isdigit(char c);
+
+int
+CFCUtil_islower(char c);
+
+int
+CFCUtil_isspace(char c);
+
+int
+CFCUtil_isupper(char c);
+
+char
+CFCUtil_tolower(char c);
+
+char
+CFCUtil_toupper(char c);
+
 /** Given two filepaths, return true if the second exists and has a
  * modification time which more recent than that of the first.
  */



[4/5] lucy-clownfish git commit: Remove unneeded ctype.h includes

2016-04-09 Thread nwellnhof
Remove unneeded ctype.h includes


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/2fda5532
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/2fda5532
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/2fda5532

Branch: refs/heads/master
Commit: 2fda55327d59ec11b88ce1056e91b46e833ff406
Parents: 8e136ed
Author: Nick Wellnhofer 
Authored: Wed Apr 6 13:31:30 2016 +0200
Committer: Nick Wellnhofer 
Committed: Wed Apr 6 13:31:30 2016 +0200

--
 runtime/core/Clownfish/ByteBuf.c | 1 -
 runtime/core/Clownfish/CharBuf.c | 1 -
 runtime/core/Clownfish/Class.c   | 1 -
 runtime/core/Clownfish/Err.c | 1 -
 runtime/perl/xs/XSBind.c | 1 -
 5 files changed, 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/2fda5532/runtime/core/Clownfish/ByteBuf.c
--
diff --git a/runtime/core/Clownfish/ByteBuf.c b/runtime/core/Clownfish/ByteBuf.c
index 96d31b6..dc03cf5 100644
--- a/runtime/core/Clownfish/ByteBuf.c
+++ b/runtime/core/Clownfish/ByteBuf.c
@@ -20,7 +20,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include "Clownfish/Class.h"
 #include "Clownfish/ByteBuf.h"

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/2fda5532/runtime/core/Clownfish/CharBuf.c
--
diff --git a/runtime/core/Clownfish/CharBuf.c b/runtime/core/Clownfish/CharBuf.c
index 3867249..5bd5c03 100644
--- a/runtime/core/Clownfish/CharBuf.c
+++ b/runtime/core/Clownfish/CharBuf.c
@@ -24,7 +24,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include "Clownfish/CharBuf.h"
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/2fda5532/runtime/core/Clownfish/Class.c
--
diff --git a/runtime/core/Clownfish/Class.c b/runtime/core/Clownfish/Class.c
index 8c5cdfe..4608866 100644
--- a/runtime/core/Clownfish/Class.c
+++ b/runtime/core/Clownfish/Class.c
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include "Clownfish/Class.h"
 #include "Clownfish/String.h"

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/2fda5532/runtime/core/Clownfish/Err.c
--
diff --git a/runtime/core/Clownfish/Err.c b/runtime/core/Clownfish/Err.c
index dd398e7..82daf02 100644
--- a/runtime/core/Clownfish/Err.c
+++ b/runtime/core/Clownfish/Err.c
@@ -23,7 +23,6 @@
 
 #include 
 #include 
-#include 
 
 #include "Clownfish/Err.h"
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/2fda5532/runtime/perl/xs/XSBind.c
--
diff --git a/runtime/perl/xs/XSBind.c b/runtime/perl/xs/XSBind.c
index 17f0266..515e752 100644
--- a/runtime/perl/xs/XSBind.c
+++ b/runtime/perl/xs/XSBind.c
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-#include 
 #include 
 
 #define C_CFISH_OBJ



[5/5] lucy-clownfish git commit: Merge branch 'ctype-fixes'

2016-04-09 Thread nwellnhof
Merge branch 'ctype-fixes'

Fixes CLOWNFISH-90.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/e4a94bca
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/e4a94bca
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/e4a94bca

Branch: refs/heads/master
Commit: e4a94bca5510dd5e11876de3a3918f7d0b7073cd
Parents: bd503cb 2fda553
Author: Nick Wellnhofer 
Authored: Sat Apr 9 15:19:35 2016 +0200
Committer: Nick Wellnhofer 
Committed: Sat Apr 9 15:19:35 2016 +0200

--
 compiler/src/CFCCHtml.c  |  1 -
 compiler/src/CFCCallable.c   |  1 -
 compiler/src/CFCClass.c  | 13 -
 compiler/src/CFCDocuComment.c| 20 +++--
 compiler/src/CFCFile.c   |  5 ++--
 compiler/src/CFCFileSpec.c   |  1 -
 compiler/src/CFCFunction.c   |  5 ++--
 compiler/src/CFCGo.c |  1 -
 compiler/src/CFCGoFunc.c |  3 +-
 compiler/src/CFCGoMethod.c   |  1 -
 compiler/src/CFCGoTypeMap.c  | 13 -
 compiler/src/CFCHierarchy.c  |  1 -
 compiler/src/CFCMethod.c |  7 ++---
 compiler/src/CFCParcel.c | 11 
 compiler/src/CFCPerl.c   |  8 +++---
 compiler/src/CFCPerlClass.c  |  2 +-
 compiler/src/CFCPerlMethod.c |  3 +-
 compiler/src/CFCPerlPod.c| 13 -
 compiler/src/CFCPyClass.c|  3 +-
 compiler/src/CFCPyMethod.c   |  5 ++--
 compiler/src/CFCPython.c |  5 ++--
 compiler/src/CFCRuby.c   |  8 +++---
 compiler/src/CFCSymbol.c |  5 ++--
 compiler/src/CFCType.c   | 13 -
 compiler/src/CFCUri.c|  5 ++--
 compiler/src/CFCUtil.c   | 53 +--
 compiler/src/CFCUtil.h   | 27 ++
 compiler/src/CFCVersion.c|  5 ++--
 runtime/core/Clownfish/ByteBuf.c |  1 -
 runtime/core/Clownfish/CharBuf.c |  1 -
 runtime/core/Clownfish/Class.c   |  1 -
 runtime/core/Clownfish/Err.c |  1 -
 runtime/core/Clownfish/String.c  |  2 +-
 runtime/perl/xs/XSBind.c |  1 -
 34 files changed, 150 insertions(+), 95 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/e4a94bca/runtime/core/Clownfish/CharBuf.c
--



[2/5] lucy-clownfish git commit: Switch to safe ctype.h wrappers

2016-04-09 Thread nwellnhof
Switch to safe ctype.h wrappers


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/a6bfd289
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/a6bfd289
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/a6bfd289

Branch: refs/heads/master
Commit: a6bfd289edd6dba8cd73aed9b655fd56ae52b20b
Parents: fb28c3c
Author: Nick Wellnhofer 
Authored: Wed Apr 6 13:24:36 2016 +0200
Committer: Nick Wellnhofer 
Committed: Wed Apr 6 13:24:36 2016 +0200

--
 compiler/src/CFCCHtml.c   |  1 -
 compiler/src/CFCCallable.c|  1 -
 compiler/src/CFCClass.c   | 13 ++---
 compiler/src/CFCDocuComment.c | 20 
 compiler/src/CFCFile.c|  5 ++---
 compiler/src/CFCFileSpec.c|  1 -
 compiler/src/CFCFunction.c|  5 +++--
 compiler/src/CFCGo.c  |  1 -
 compiler/src/CFCGoFunc.c  |  3 +--
 compiler/src/CFCGoMethod.c|  1 -
 compiler/src/CFCGoTypeMap.c   | 13 ++---
 compiler/src/CFCHierarchy.c   |  1 -
 compiler/src/CFCMethod.c  |  7 +++
 compiler/src/CFCParcel.c  | 11 +--
 compiler/src/CFCPerl.c|  8 
 compiler/src/CFCPerlClass.c   |  2 +-
 compiler/src/CFCPerlMethod.c  |  3 +--
 compiler/src/CFCPerlPod.c | 13 ++---
 compiler/src/CFCPyClass.c |  3 +--
 compiler/src/CFCPyMethod.c|  5 ++---
 compiler/src/CFCPython.c  |  5 ++---
 compiler/src/CFCRuby.c|  8 
 compiler/src/CFCSymbol.c  |  5 ++---
 compiler/src/CFCType.c| 13 ++---
 compiler/src/CFCUri.c |  5 ++---
 compiler/src/CFCUtil.c|  4 ++--
 compiler/src/CFCVersion.c |  5 ++---
 27 files changed, 73 insertions(+), 89 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/a6bfd289/compiler/src/CFCCHtml.c
--
diff --git a/compiler/src/CFCCHtml.c b/compiler/src/CFCCHtml.c
index a054cb8..222f5fd 100644
--- a/compiler/src/CFCCHtml.c
+++ b/compiler/src/CFCCHtml.c
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-#include 
 #include 
 #include 
 #include 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/a6bfd289/compiler/src/CFCCallable.c
--
diff --git a/compiler/src/CFCCallable.c b/compiler/src/CFCCallable.c
index ccb3931..8071761 100644
--- a/compiler/src/CFCCallable.c
+++ b/compiler/src/CFCCallable.c
@@ -15,7 +15,6 @@
  */
 
 #include 
-#include 
 
 #ifndef true
 #define true 1

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/a6bfd289/compiler/src/CFCClass.c
--
diff --git a/compiler/src/CFCClass.c b/compiler/src/CFCClass.c
index 77e0158..319b1ae 100644
--- a/compiler/src/CFCClass.c
+++ b/compiler/src/CFCClass.c
@@ -16,7 +16,6 @@
 
 #include 
 #include 
-#include 
 
 #ifndef true
   #define true 1
@@ -139,22 +138,22 @@ CFCClass_validate_class_name(const char *class_name) {
 for (;;substring++) {
 if (*substring == 0)  { return false; }
 else if (*substring == ':')   { return false; }
-else if (islower(*substring)) { break; }
+else if (CFCUtil_islower(*substring)) { break; }
 }
 
 // Must be UpperCamelCase, separated by "::".
 const char *ptr = class_name;
-if (!isupper(*ptr)) { return false; }
+if (!CFCUtil_isupper(*ptr)) { return false; }
 while (*ptr != 0) {
 if (*ptr == 0) { break; }
 else if (*ptr == ':') {
 ptr++;
 if (*ptr != ':') { return false; }
 ptr++;
-if (!isupper(*ptr)) { return false; }
+if (!CFCUtil_isupper(*ptr)) { return false; }
 ptr++;
 }
-else if (!isalnum(*ptr)) { return false; }
+else if (!CFCUtil_isalnum(*ptr)) { return false; }
 else { ptr++; }
 }
 
@@ -178,7 +177,7 @@ S_validate_nickname(const char *nickname) {
 if (strlen(nickname)) { return true; }
 else { break; }
 }
-else if (!isupper(*ptr)) { break; }
+else if (!CFCUtil_isupper(*ptr)) { break; }
 }
 
 // Same as one component of a class name.
@@ -274,7 +273,7 @@ CFCClass_do_create(CFCClass *self, struct CFCParcel *parcel,
 char *short_class_var = (char*)MALLOCATE(struct_sym_len + 1);
 size_t i;
 for (i = 0; i < struct_sym_len; i++) {
-short_class_var[i] = (char)toupper(struct_sym[i]);
+short_class_var[i] = CFCUtil_toupper(struct_sym[i]);
 }
 short_class_var[struct_sym_len] = '\0';
 self->short_class_var = short_class_var;


lucy git commit: Clean empty directory 'lib/Lucy/Docs'

2016-04-06 Thread nwellnhof
Repository: lucy
Updated Branches:
  refs/heads/master 632a46b8b -> abee805b1


Clean empty directory 'lib/Lucy/Docs'


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/abee805b
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/abee805b
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/abee805b

Branch: refs/heads/master
Commit: abee805b16713bb42a1e94e97db944462400160a
Parents: 632a46b
Author: Nick Wellnhofer 
Authored: Wed Apr 6 17:05:27 2016 +0200
Committer: Nick Wellnhofer 
Committed: Wed Apr 6 17:05:27 2016 +0200

--
 perl/buildlib/Lucy/Build.pm | 9 +
 1 file changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/abee805b/perl/buildlib/Lucy/Build.pm
--
diff --git a/perl/buildlib/Lucy/Build.pm b/perl/buildlib/Lucy/Build.pm
index 575f6a9..7cb2392 100644
--- a/perl/buildlib/Lucy/Build.pm
+++ b/perl/buildlib/Lucy/Build.pm
@@ -207,6 +207,15 @@ sub ACTION_parsers {
 }
 }
 
+sub ACTION_clownfish {
+my $self = shift;
+
+$self->SUPER::ACTION_clownfish;
+
+# Make sure to remove empty directory.
+$self->add_to_cleanup( catdir( $LIB_DIR, 'Lucy', 'Docs' ) );
+}
+
 sub ACTION_compile_custom_xs {
 my $self = shift;
 



[1/2] lucy-clownfish git commit: Null-terminate buffer in CB_Yield_String

2016-04-06 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/master 658d11806 -> bd503cb73


Null-terminate buffer in CB_Yield_String

This makes sure that strings created with CharBufs can safely be accessed
as C strings.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/e5b853eb
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/e5b853eb
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/e5b853eb

Branch: refs/heads/master
Commit: e5b853ebef110918526d6bd961d06a83d4230109
Parents: 658d118
Author: Nick Wellnhofer 
Authored: Wed Apr 6 16:25:23 2016 +0200
Committer: Nick Wellnhofer 
Committed: Wed Apr 6 16:25:23 2016 +0200

--
 runtime/core/Clownfish/CharBuf.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/e5b853eb/runtime/core/Clownfish/CharBuf.c
--
diff --git a/runtime/core/Clownfish/CharBuf.c b/runtime/core/Clownfish/CharBuf.c
index 3867249..e6392b2 100644
--- a/runtime/core/Clownfish/CharBuf.c
+++ b/runtime/core/Clownfish/CharBuf.c
@@ -273,11 +273,18 @@ CB_To_String_IMP(CharBuf *self) {
 
 String*
 CB_Yield_String_IMP(CharBuf *self) {
-String *retval
-= Str_new_steal_trusted_utf8(self->ptr, self->size);
+// Null-terminate buffer.
+size_t size = self->size;
+SI_add_grow_and_oversize(self, size, 1);
+self->ptr[size] = '\0';
+
+String *retval = Str_new_steal_trusted_utf8(self->ptr, size);
+
+// Clear CharBuf.
 self->ptr  = NULL;
 self->size = 0;
 self->cap  = 0;
+
 return retval;
 }
 



[2/2] lucy-clownfish git commit: Clean empty directory 'lib/Clownfish/Docs'

2016-04-06 Thread nwellnhof
Clean empty directory 'lib/Clownfish/Docs'


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/bd503cb7
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/bd503cb7
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/bd503cb7

Branch: refs/heads/master
Commit: bd503cb730e6ed2f66b317103733cac866185304
Parents: e5b853e
Author: Nick Wellnhofer 
Authored: Wed Apr 6 17:00:19 2016 +0200
Committer: Nick Wellnhofer 
Committed: Wed Apr 6 17:00:19 2016 +0200

--
 runtime/perl/buildlib/Clownfish/Build.pm | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/bd503cb7/runtime/perl/buildlib/Clownfish/Build.pm
--
diff --git a/runtime/perl/buildlib/Clownfish/Build.pm 
b/runtime/perl/buildlib/Clownfish/Build.pm
index 79c5239..a4e0aa6 100644
--- a/runtime/perl/buildlib/Clownfish/Build.pm
+++ b/runtime/perl/buildlib/Clownfish/Build.pm
@@ -140,6 +140,9 @@ sub ACTION_clownfish {
 $self->depends_on('cfc');
 
 $self->SUPER::ACTION_clownfish;
+
+# Make sure to remove empty directory.
+$self->add_to_cleanup( catdir( $LIB_DIR, 'Clownfish', 'Docs' ) );
 }
 
 sub ACTION_compile_custom_xs {



lucy-clownfish git commit: Null-terminate buffer in CB_Yield_String

2016-04-06 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/0.5 443645ab6 -> cf9d70341


Null-terminate buffer in CB_Yield_String

This makes sure that strings created with CharBufs can safely be accessed
as C strings.

Fixes invalid reads in the Lucy test suite.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/cf9d7034
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/cf9d7034
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/cf9d7034

Branch: refs/heads/0.5
Commit: cf9d703419a0351daf247d37355976c67499217a
Parents: 443645a
Author: Nick Wellnhofer 
Authored: Wed Apr 6 16:25:23 2016 +0200
Committer: Nick Wellnhofer 
Committed: Wed Apr 6 16:28:08 2016 +0200

--
 runtime/core/Clownfish/CharBuf.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cf9d7034/runtime/core/Clownfish/CharBuf.c
--
diff --git a/runtime/core/Clownfish/CharBuf.c b/runtime/core/Clownfish/CharBuf.c
index 53541c2..665a935 100644
--- a/runtime/core/Clownfish/CharBuf.c
+++ b/runtime/core/Clownfish/CharBuf.c
@@ -274,11 +274,18 @@ CB_To_String_IMP(CharBuf *self) {
 
 String*
 CB_Yield_String_IMP(CharBuf *self) {
-String *retval
-= Str_new_steal_trusted_utf8(self->ptr, self->size);
+// Null-terminate buffer.
+size_t size = self->size;
+SI_add_grow_and_oversize(self, size, 1);
+self->ptr[size] = '\0';
+
+String *retval = Str_new_steal_trusted_utf8(self->ptr, size);
+
+// Clear CharBuf.
 self->ptr  = NULL;
 self->size = 0;
 self->cap  = 0;
+
 return retval;
 }
 



lucy-clownfish git commit: Fix validation of non-ASCII symbol names

2016-04-06 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/0.5 6a70a65d0 -> 443645ab6


Fix validation of non-ASCII symbol names

Should fix CLOWNFISH-77 (test failures on Strawberry Perl).


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/443645ab
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/443645ab
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/443645ab

Branch: refs/heads/0.5
Commit: 443645ab6b1a4ef43759b7b7f8d079dbe673ec12
Parents: 6a70a65
Author: Nick Wellnhofer 
Authored: Wed Apr 6 16:04:14 2016 +0200
Committer: Nick Wellnhofer 
Committed: Wed Apr 6 16:04:14 2016 +0200

--
 compiler/src/CFCSymbol.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/443645ab/compiler/src/CFCSymbol.c
--
diff --git a/compiler/src/CFCSymbol.c b/compiler/src/CFCSymbol.c
index 2dd7ddc..053c781 100644
--- a/compiler/src/CFCSymbol.c
+++ b/compiler/src/CFCSymbol.c
@@ -56,9 +56,9 @@ S_validate_exposure(const char *exposure) {
 static int
 S_validate_identifier(const char *identifier) {
 const char *ptr = identifier;
-if (!isalpha(*ptr) && *ptr != '_') { return false; }
+if (!isalpha((unsigned char)*ptr) && *ptr != '_') { return false; }
 for (; *ptr != 0; ptr++) {
-if (!isalnum(*ptr) && *ptr != '_') { return false; }
+if (!isalnum((unsigned char)*ptr) && *ptr != '_') { return false; }
 }
 return true;
 }



svn commit: r984800 - /websites/production/lucy/content/

2016-04-05 Thread nwellnhof
Author: nwellnhof
Date: Tue Apr  5 11:49:50 2016
New Revision: 984800

Log:
Publishing svnmucc operation to lucy site by nwellnhof

Added:
websites/production/lucy/content/
  - copied from r984799, websites/staging/lucy/trunk/content/



svn commit: r1737825 - /lucy/site/trunk/content/index.mdtext

2016-04-05 Thread nwellnhof
Author: nwellnhof
Date: Tue Apr  5 11:46:00 2016
New Revision: 1737825

URL: http://svn.apache.org/viewvc?rev=1737825=rev
Log:
Add some "Getting Started" links

Modified:
lucy/site/trunk/content/index.mdtext

Modified: lucy/site/trunk/content/index.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/index.mdtext?rev=1737825=1737824=1737825=diff
==
--- lucy/site/trunk/content/index.mdtext (original)
+++ lucy/site/trunk/content/index.mdtext Tue Apr  5 11:46:00 2016
@@ -20,7 +20,10 @@ It requires the [Apache Clownfish](/down
 After downloading and installing Lucy, consider stepping through the
 tutorial:
 
-* [Perl tutorial](/docs/perl/Lucy/Docs/Tutorial.html)
+* [Lucy Perl tutorial](/docs/perl/Lucy/Docs/Tutorial.html)
+* [Lucy C tutorial](/docs/c/Lucy/Docs/Tutorial.html)
+* [Clownfish intro](/docs/c/Clownfish/Docs/ClassIntro.html)
+* [Clownfish specification](/docs/c/Clownfish/Docs/WritingClasses.html)
 
 --
 




[1/4] lucy git commit: Fix wrong vararg type in LFLock_init

2016-04-05 Thread nwellnhof
Repository: lucy
Updated Branches:
  refs/heads/0.5 6ca063705 -> 4ad771ceb


Fix wrong vararg type in LFLock_init

This only results in random junk in a tempfile name, so probably
harmless.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/06e91814
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/06e91814
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/06e91814

Branch: refs/heads/0.5
Commit: 06e918146a0f42830c8e2295e2a8f84589ddd4c9
Parents: 6ca0637
Author: Nick Wellnhofer 
Authored: Fri Mar 25 11:25:09 2016 +0100
Committer: Nick Wellnhofer 
Committed: Tue Apr 5 11:49:16 2016 +0200

--
 core/Lucy/Store/Lock.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/06e91814/core/Lucy/Store/Lock.c
--
diff --git a/core/Lucy/Store/Lock.c b/core/Lucy/Store/Lock.c
index 40b9704..20bffe2 100644
--- a/core/Lucy/Store/Lock.c
+++ b/core/Lucy/Store/Lock.c
@@ -124,7 +124,8 @@ LFLock_init(LockFileLock *self, Folder *folder, String 
*name,
 int pid = PID_getpid();
 Lock_init((Lock*)self, folder, name, host, timeout, interval);
 LockFileLockIVARS *const ivars = LFLock_IVARS(self);
-ivars->link_path = Str_newf("%o.%o.%i64", ivars->lock_path, host, pid);
+ivars->link_path = Str_newf("%o.%o.%i64", ivars->lock_path, host,
+(int64_t)pid);
 return self;
 }
 



[2/4] lucy git commit: Rework Travis setup

2016-04-05 Thread nwellnhof
Rework Travis setup

- Test Go bindings.
- Test without sudo.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/9a64e898
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/9a64e898
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/9a64e898

Branch: refs/heads/0.5
Commit: 9a64e89804194cb28d0f680ed07a2f3b80ec9a45
Parents: 06e9181
Author: Nick Wellnhofer 
Authored: Sun Mar 6 18:39:12 2016 +0100
Committer: Nick Wellnhofer 
Committed: Tue Apr 5 11:53:32 2016 +0200

--
 .travis.yml  |  4 ++--
 devel/bin/travis-test.sh | 35 +--
 2 files changed, 27 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/9a64e898/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index a84cc40..052e274 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,13 +14,13 @@
 # limitations under the License.
 
 language: perl
-sudo: required
+sudo: false
 # Override Travis' default Perl installation script.
 install: 'true'
 script: devel/bin/travis-test.sh
 env:
   - LUCY_DEBUG=1 CLOWNFISH_HOST=c
-#  - LUCY_DEBUG=1 CLOWNFISH_HOST=go
+  - LUCY_DEBUG=1 CLOWNFISH_HOST=go
   - LUCY_DEBUG=1 CLOWNFISH_HOST=perl PERL_VERSION=5.20
   - LUCY_DEBUG=1 CLOWNFISH_HOST=perl PERL_VERSION=5.18
   - LUCY_DEBUG=1 CLOWNFISH_HOST=perl PERL_VERSION=5.16

http://git-wip-us.apache.org/repos/asf/lucy/blob/9a64e898/devel/bin/travis-test.sh
--
diff --git a/devel/bin/travis-test.sh b/devel/bin/travis-test.sh
index 5846897..dbced44 100755
--- a/devel/bin/travis-test.sh
+++ b/devel/bin/travis-test.sh
@@ -21,31 +21,33 @@ set -e
 # Print all commands before executing.
 set -x
 
+install_dir="$TRAVIS_BUILD_DIR/install"
+
+# Fetch Clownfish.
+git clone -q -b 0.5 --depth 1 
https://git-wip-us.apache.org/repos/asf/lucy-clownfish.git
+
 test_c() {
 # Install Clownfish.
-git clone -q -b 0.5 --depth 1 
https://git-wip-us.apache.org/repos/asf/lucy-clownfish.git
 cd lucy-clownfish/runtime/c
 ./configure
 make -j
-sudo ./install.sh --prefix /usr/local
-sudo ldconfig
+./install.sh --prefix "$install_dir"
 
 cd ../../../c
-./configure
+./configure --clownfish-prefix "$install_dir"
 make -j test
 }
 
 test_perl() {
 perlbrew switch $PERL_VERSION
+export PERL5LIB="$install_dir/lib/perl5"
 
 # Install Clownfish.
-git clone -q -b 0.5 --depth 1 
https://git-wip-us.apache.org/repos/asf/lucy-clownfish.git
 cd lucy-clownfish/runtime/perl
 perl Build.PL
-./Build
-sudo ./Build install
+./Build install --install-base "$install_dir"
 cd ../../compiler/perl
-sudo ./Build install
+./Build install --install-base "$install_dir"
 
 cd ../../../perl
 perl Build.PL
@@ -53,8 +55,21 @@ test_perl() {
 }
 
 test_go() {
-# TODO
-exit 1
+export GOPATH="$install_dir"
+mkdir -p "$install_dir/src/git-wip-us.apache.org/repos/asf"
+ln -s "$TRAVIS_BUILD_DIR/lucy-clownfish" \
+"$install_dir/src/git-wip-us.apache.org/repos/asf/lucy-clownfish.git"
+ln -s "$TRAVIS_BUILD_DIR" \
+"$install_dir/src/git-wip-us.apache.org/repos/asf/lucy.git"
+
+# Install Clownfish.
+cd lucy-clownfish/compiler/go
+go run build.go install
+cd ../../runtime/go
+go run build.go install
+
+cd ../../../go
+go run build.go test
 }
 
 case $CLOWNFISH_HOST in



[2/2] lucy git commit: Dereference token_re on older Perls

2016-04-05 Thread nwellnhof
Dereference token_re on older Perls

Broken in commit 633c4d3.

Fixes LUCY-297.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/632a46b8
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/632a46b8
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/632a46b8

Branch: refs/heads/master
Commit: 632a46b8b8df694d320cda2bcec72d5248e9a49f
Parents: 97d51f7
Author: Nick Wellnhofer 
Authored: Mon Apr 4 17:59:56 2016 +0200
Committer: Nick Wellnhofer 
Committed: Tue Apr 5 11:48:11 2016 +0200

--
 perl/xs/Lucy/Analysis/RegexTokenizer.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/632a46b8/perl/xs/Lucy/Analysis/RegexTokenizer.c
--
diff --git a/perl/xs/Lucy/Analysis/RegexTokenizer.c 
b/perl/xs/Lucy/Analysis/RegexTokenizer.c
index b558875..9a3fcc6 100644
--- a/perl/xs/Lucy/Analysis/RegexTokenizer.c
+++ b/perl/xs/Lucy/Analysis/RegexTokenizer.c
@@ -58,9 +58,13 @@ lucy_RegexTokenizer_init(lucy_RegexTokenizer *self,
 #if (PERL_VERSION > 10)
 REGEXP *rx = SvRX((SV*)token_re);
 #else
+if (!SvROK(token_re)) {
+THROW(CFISH_ERR, "token_re is not a qr// entity");
+}
+SV *inner = SvRV(token_re);
 MAGIC *magic = NULL;
-if (SvMAGICAL((SV*)token_re)) {
-magic = mg_find((SV*)token_re, PERL_MAGIC_qr);
+if (SvMAGICAL((SV*)inner)) {
+magic = mg_find((SV*)inner, PERL_MAGIC_qr);
 }
 if (!magic) {
 THROW(CFISH_ERR, "token_re is not a qr// entity");



[1/2] lucy git commit: Fix switching Perl versions under Travis

2016-04-05 Thread nwellnhof
Repository: lucy
Updated Branches:
  refs/heads/master 8804cba6f -> 632a46b8b


Fix switching Perl versions under Travis


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/97d51f7d
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/97d51f7d
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/97d51f7d

Branch: refs/heads/master
Commit: 97d51f7d0b0f1f37cba1434e66e1af9ad6a45366
Parents: 8804cba
Author: Nick Wellnhofer 
Authored: Tue Apr 5 11:33:02 2016 +0200
Committer: Nick Wellnhofer 
Committed: Tue Apr 5 11:48:10 2016 +0200

--
 devel/bin/travis-test.sh | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/97d51f7d/devel/bin/travis-test.sh
--
diff --git a/devel/bin/travis-test.sh b/devel/bin/travis-test.sh
index 69bc4e2..6e9c494 100755
--- a/devel/bin/travis-test.sh
+++ b/devel/bin/travis-test.sh
@@ -39,7 +39,9 @@ test_c() {
 }
 
 test_perl() {
+source ~/perl5/perlbrew/etc/bashrc
 perlbrew switch $PERL_VERSION
+perlbrew list
 export PERL5LIB="$install_dir/lib/perl5"
 
 # Install Clownfish.



lucy-clownfish git commit: Fix switching Perl versions under Travis

2016-04-05 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/master 4c7a29ab7 -> 658d11806


Fix switching Perl versions under Travis

It seems that we only tested with Perl 5.14 lately.

Fixes CLOWNFISH-88.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/658d1180
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/658d1180
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/658d1180

Branch: refs/heads/master
Commit: 658d118066a42ba2e1c07bd5f7d82c499f09a03d
Parents: 4c7a29a
Author: Nick Wellnhofer 
Authored: Tue Apr 5 10:49:52 2016 +0200
Committer: Nick Wellnhofer 
Committed: Tue Apr 5 11:30:42 2016 +0200

--
 devel/bin/travis-test.sh | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/658d1180/devel/bin/travis-test.sh
--
diff --git a/devel/bin/travis-test.sh b/devel/bin/travis-test.sh
index 9f7adb5..8251caf 100755
--- a/devel/bin/travis-test.sh
+++ b/devel/bin/travis-test.sh
@@ -31,7 +31,9 @@ test_c() {
 }
 
 test_perl() {
+source ~/perl5/perlbrew/etc/bashrc
 perlbrew switch $PERL_VERSION
+perlbrew list
 cd compiler/perl
 cpanm --quiet --installdeps --notest .
 perl Build.PL



lucy git commit: Move pod2mdtext.pl from Lucy to Clownfish

2016-04-04 Thread nwellnhof
Repository: lucy
Updated Branches:
  refs/heads/master 8193b73ef -> 51c01bd28


Move pod2mdtext.pl from Lucy to Clownfish


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/51c01bd2
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/51c01bd2
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/51c01bd2

Branch: refs/heads/master
Commit: 51c01bd282032ee21d72900b4a265aae2dff8c89
Parents: 8193b73
Author: Nick Wellnhofer 
Authored: Mon Apr 4 15:18:02 2016 +0200
Committer: Nick Wellnhofer 
Committed: Mon Apr 4 15:18:02 2016 +0200

--
 devel/bin/pod2mdtext.pl | 168 ---
 1 file changed, 168 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/51c01bd2/devel/bin/pod2mdtext.pl
--
diff --git a/devel/bin/pod2mdtext.pl b/devel/bin/pod2mdtext.pl
deleted file mode 100755
index bfaf070..000
--- a/devel/bin/pod2mdtext.pl
+++ /dev/null
@@ -1,168 +0,0 @@
-#!/usr/bin/perl
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-=head1 NAME
-
-pod2mdtext.pl - Convert POD to mdtext for the Apache CMS
-
-=head1 SYNOPSIS
-
-pod2mdtext.pl --name=PROJECT_NAME [--full-name=FULL_NAME]
-  --version=X.Y.Z
-
-=head1 DESCRIPTION
-
-This script creates mdtext files from POD. It must be run in the C
-directory and scans all .pod and .pm files found in C. The resulting
-mdtext files are stored in a directory named C.
-
-=head1 OPTIONS
-
-=head2 --name
-
-Short name of the project used for the index filename.
-
-=head2 --full-name
-
-Full name of the project used in titles. Defaults to C<--name>.
-
-=head2 --version
-
-Version number.
-
-=cut
-
-use strict;
-use warnings;
-use utf8;
-
-use File::Find;
-use File::Path qw( make_path );
-use File::Slurp;
-use Getopt::Long qw( GetOptions );
-use Pod::Simple::HTML;
-
-my $out_root = 'mdtext';
-
-my $usage = join( ' ',
-$0,
-'--name=PROJECT_NAME',
-'[--full-name=FULL_NAME]',
-'--version=X.Y.Z',
-) . "\n";
-
-my ( $project_name, $full_name, $version );
-GetOptions(
-'name=s'  => \$project_name,
-'full-name=s' => \$full_name,
-'version=s'   => \$version,
-);
-$project_name or die $usage;
-$version  or die $usage;
-$full_name ||= $project_name;
-
-my @pod_infos;
-
-find( { wanted => \_file, no_chdir => 1 }, 'lib' );
-
-write_index();
-
-sub process_file {
-my $filename = $_;
-my $dir  = $File::Find::topdir;
-
-return if -d $filename || $filename !~ /\.(pm|pod)\z/;
-my $content = read_file( $filename, binmode => ':utf8' );
-return if $filename =~ /\.pm$/ && $content !~ /^=head1/m;
-$filename =~ s|^$dir/||;
-
-if ( $content =~ /^=head1\s*NAME\s+(\S+)\s+-\s+(.*?)\s+^=/ms ) {
-push(@pod_infos, {
-class=> $1,
-desc => $2,
-filename => $filename,
-});
-}
-else {
-print STDERR ("Warning: No valid NAME section found in $filename\n");
-}
-
-pod2mdtext( $dir, $filename );
-};
-
-sub pod2mdtext {
-my ( $base_dir, $filename ) = @_;
-
-my @path_comps = split('/', $filename);
-pop(@path_comps);
-
-my $out_dir = join('/', $out_root, @path_comps);
-make_path($out_dir);
-
-my $out_filename = "$out_root/$filename";
-$out_filename =~ s|(\.[^/.]*)?\z|.mdtext|;
-
-open( my $out_file, '>', $out_filename )
-or die("$out_filename: $!");
-
-my $p = Pod::Simple::HTML->new;
-my $after_title = " \x{2013} $full_name Documentation\n\n\n";
-# Pod::Simple expects bytes.
-utf8::encode($after_title);
-
-$p->batch_mode(1);
-$p->batch_mode_current_level( scalar(@path_comps) + 1 );
-$p->html_header_before_title('Title: ');
-$p->html_header_after_title($after_title);
-$p->html_footer("\n\n");
-$p->html_h_level(2);
-# Needed to make strip_verbatim_indent work, no idea why.
-$p->unaccept_codes('VerbatimFormatted');
-$p->strip_verbatim_indent('');
-
-

[2/2] lucy-clownfish git commit: Add script to convert C API docs to mdtext

2016-04-04 Thread nwellnhof
Add script to convert C API docs to mdtext


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/4c7a29ab
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/4c7a29ab
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/4c7a29ab

Branch: refs/heads/master
Commit: 4c7a29ab7c0c8eb2dab4efce4edd4f3d2ee1b58f
Parents: 992bdf8
Author: Nick Wellnhofer 
Authored: Mon Apr 4 15:15:25 2016 +0200
Committer: Nick Wellnhofer 
Committed: Mon Apr 4 15:15:25 2016 +0200

--
 devel/bin/html2mdtext.pl | 94 +++
 1 file changed, 94 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/4c7a29ab/devel/bin/html2mdtext.pl
--
diff --git a/devel/bin/html2mdtext.pl b/devel/bin/html2mdtext.pl
new file mode 100755
index 000..0b53569
--- /dev/null
+++ b/devel/bin/html2mdtext.pl
@@ -0,0 +1,94 @@
+#!/usr/bin/perl
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+=head1 NAME
+
+html2mdtext.pl - Convert HTML to mdtext for the Apache CMS
+
+=head1 SYNOPSIS
+
+html2mdtext.pl
+
+=head1 DESCRIPTION
+
+This script creates mdtext files from HTML. It must be run in the C
+directory and scans all .html files found in C.
+The resulting mdtext files are stored in a directory named C.
+
+=cut
+
+use strict;
+use warnings;
+use utf8;
+
+use File::Find;
+use File::Path qw( make_path );
+use File::Slurp;
+
+my $src_dir  = 'autogen/share/doc/clownfish';
+my $out_root = 'mdtext';
+
+find( { wanted => \_file, no_chdir => 1 }, $src_dir );
+
+sub process_file {
+my $filename = $_;
+my $dir  = $File::Find::topdir;
+
+return if -d $filename || $filename !~ /\.html\z/;
+$filename =~ s|^$dir/||;
+
+html2mdtext( $dir, $filename );
+};
+
+sub html2mdtext {
+my ( $base_dir, $filename ) = @_;
+
+my $content = read_file( "$base_dir/$filename", binmode => ':utf8' );
+
+if ($content !~ m|([^<]+)|) {
+warn("No title found in $filename");
+return;
+}
+my $title = $1;
+
+if ($content !~ m|\s*(.+?)\s*|s) {
+warn("No body found in $filename");
+return;
+}
+$content = $1;
+
+# Increase header level.
+$content =~ s{(}{ $1 . ($2 + 1) . '>' }ge;
+
+$content = <<"EOF";
+Title: $title
+
+
+$content
+
+EOF
+
+my @path_comps = split('/', $filename);
+pop(@path_comps);
+my $out_dir = join('/', $out_root, @path_comps);
+make_path($out_dir);
+
+my $out_filename = "$out_root/$filename";
+$out_filename =~ s|(\.[^/.]*)?\z|.mdtext|;
+write_file( $out_filename, { binmode => ':utf8' }, \$content );
+}
+



[1/2] lucy-clownfish git commit: Move pod2mdtext.pl from Lucy to Clownfish

2016-04-04 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/master 77c771d02 -> 4c7a29ab7


Move pod2mdtext.pl from Lucy to Clownfish


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/992bdf87
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/992bdf87
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/992bdf87

Branch: refs/heads/master
Commit: 992bdf8784d3adc284484e8297e91b7b6b568cc8
Parents: 77c771d
Author: Nick Wellnhofer 
Authored: Mon Apr 4 15:14:35 2016 +0200
Committer: Nick Wellnhofer 
Committed: Mon Apr 4 15:14:35 2016 +0200

--
 devel/bin/pod2mdtext.pl | 168 +++
 1 file changed, 168 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/992bdf87/devel/bin/pod2mdtext.pl
--
diff --git a/devel/bin/pod2mdtext.pl b/devel/bin/pod2mdtext.pl
new file mode 100755
index 000..bfaf070
--- /dev/null
+++ b/devel/bin/pod2mdtext.pl
@@ -0,0 +1,168 @@
+#!/usr/bin/perl
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+=head1 NAME
+
+pod2mdtext.pl - Convert POD to mdtext for the Apache CMS
+
+=head1 SYNOPSIS
+
+pod2mdtext.pl --name=PROJECT_NAME [--full-name=FULL_NAME]
+  --version=X.Y.Z
+
+=head1 DESCRIPTION
+
+This script creates mdtext files from POD. It must be run in the C
+directory and scans all .pod and .pm files found in C. The resulting
+mdtext files are stored in a directory named C.
+
+=head1 OPTIONS
+
+=head2 --name
+
+Short name of the project used for the index filename.
+
+=head2 --full-name
+
+Full name of the project used in titles. Defaults to C<--name>.
+
+=head2 --version
+
+Version number.
+
+=cut
+
+use strict;
+use warnings;
+use utf8;
+
+use File::Find;
+use File::Path qw( make_path );
+use File::Slurp;
+use Getopt::Long qw( GetOptions );
+use Pod::Simple::HTML;
+
+my $out_root = 'mdtext';
+
+my $usage = join( ' ',
+$0,
+'--name=PROJECT_NAME',
+'[--full-name=FULL_NAME]',
+'--version=X.Y.Z',
+) . "\n";
+
+my ( $project_name, $full_name, $version );
+GetOptions(
+'name=s'  => \$project_name,
+'full-name=s' => \$full_name,
+'version=s'   => \$version,
+);
+$project_name or die $usage;
+$version  or die $usage;
+$full_name ||= $project_name;
+
+my @pod_infos;
+
+find( { wanted => \_file, no_chdir => 1 }, 'lib' );
+
+write_index();
+
+sub process_file {
+my $filename = $_;
+my $dir  = $File::Find::topdir;
+
+return if -d $filename || $filename !~ /\.(pm|pod)\z/;
+my $content = read_file( $filename, binmode => ':utf8' );
+return if $filename =~ /\.pm$/ && $content !~ /^=head1/m;
+$filename =~ s|^$dir/||;
+
+if ( $content =~ /^=head1\s*NAME\s+(\S+)\s+-\s+(.*?)\s+^=/ms ) {
+push(@pod_infos, {
+class=> $1,
+desc => $2,
+filename => $filename,
+});
+}
+else {
+print STDERR ("Warning: No valid NAME section found in $filename\n");
+}
+
+pod2mdtext( $dir, $filename );
+};
+
+sub pod2mdtext {
+my ( $base_dir, $filename ) = @_;
+
+my @path_comps = split('/', $filename);
+pop(@path_comps);
+
+my $out_dir = join('/', $out_root, @path_comps);
+make_path($out_dir);
+
+my $out_filename = "$out_root/$filename";
+$out_filename =~ s|(\.[^/.]*)?\z|.mdtext|;
+
+open( my $out_file, '>', $out_filename )
+or die("$out_filename: $!");
+
+my $p = Pod::Simple::HTML->new;
+my $after_title = " \x{2013} $full_name Documentation\n\n\n";
+# Pod::Simple expects bytes.
+utf8::encode($after_title);
+
+$p->batch_mode(1);
+$p->batch_mode_current_level( scalar(@path_comps) + 1 );
+$p->html_header_before_title('Title: ');
+$p->html_header_after_title($after_title);
+$p->html_footer("\n\n");
+$p->html_h_level(2);
+# Needed to make strip_verbatim_indent work, no idea why.
+$p->unaccept_codes('VerbatimFormatted');
+

svn commit: r984694 - /websites/production/lucy/content/

2016-04-04 Thread nwellnhof
Author: nwellnhof
Date: Mon Apr  4 13:11:50 2016
New Revision: 984694

Log:
Publishing svnmucc operation to lucy site by nwellnhof

Added:
websites/production/lucy/content/
  - copied from r984693, websites/staging/lucy/trunk/content/



svn commit: r1737684 - /lucy/site/trunk/content/css/lucy.css

2016-04-04 Thread nwellnhof
Author: nwellnhof
Date: Mon Apr  4 13:05:03 2016
New Revision: 1737684

URL: http://svn.apache.org/viewvc?rev=1737684=rev
Log:
Reset CSS properties for C API tables

Modified:
lucy/site/trunk/content/css/lucy.css

Modified: lucy/site/trunk/content/css/lucy.css
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/css/lucy.css?rev=1737684=1737683=1737684=diff
==
--- lucy/site/trunk/content/css/lucy.css (original)
+++ lucy/site/trunk/content/css/lucy.css Mon Apr  4 13:05:03 2016
@@ -130,9 +130,15 @@ pre, code {
 
 .c-api table {
 border-collapse: collapse;
+/* Reset */
+width: auto;
+border: none;
 }
 .c-api td {
 padding: 0;
+/* Reset */
+background: transparent;
+border: none;
 }
 .c-api td.label {
 padding-right: 2em;




svn commit: r1737682 [2/8] - in /lucy/site/trunk/content: css/ docs/ docs/c/ docs/c/Clownfish/ docs/c/Clownfish/Docs/ docs/c/Lucy/ docs/c/Lucy/Analysis/ docs/c/Lucy/Docs/ docs/c/Lucy/Docs/Cookbook/ do

2016-04-04 Thread nwellnhof
Added: lucy/site/trunk/content/docs/c/Clownfish/Hash.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Clownfish/Hash.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Clownfish/Hash.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Clownfish/Hash.mdtext Mon Apr  4 12:55:10 
2016
@@ -0,0 +1,237 @@
+Title: Clownfish::Hash – C API Documentation
+
+
+Clownfish::Hash
+
+
+parcel
+Clownfish
+
+
+class variable
+CFISH_HASH
+
+
+struct symbol
+cfish_Hash
+
+
+class nickname
+cfish_Hash
+
+
+header file
+Clownfish/Hash.h
+
+
+Name
+Clownfish::Hash – Hashtable.
+Description
+Values are stored by reference and may be any kind of Obj.
+Functions
+
+new
+
+cfish_Hash* // 
incremented
+cfish_Hash_new(
+size_t capacity
+);
+
+Return a new Hash.
+
+capacity
+The number of elements that the hash will be asked to
+hold initially.
+
+
+
+init
+
+cfish_Hash*
+cfish_Hash_init(
+cfish_Hash *self,
+size_t capacity
+);
+
+Initialize a Hash.
+
+capacity
+The number of elements that the hash will be asked to
+hold initially.
+
+
+
+
+Methods
+
+Clear
+
+void
+cfish_Hash_Clear(
+cfish_Hash *self
+);
+
+Empty the hash of all key-value pairs.
+
+Store
+
+void
+cfish_Hash_Store(
+cfish_Hash *self,
+cfish_String *key,
+cfish_Obj 
*value // decremented
+);
+
+Store a key-value pair.
+
+Store_Utf8
+
+void
+cfish_Hash_Store_Utf8(
+cfish_Hash *self,
+char *utf8,
+size_t size,
+cfish_Obj 
*value // decremented
+);
+
+Store a key-value pair using a raw UTF-8 key.
+
+utf8
+Pointer to UTF-8 character data of the key.
+
+size
+Size of UTF-8 character data in bytes.
+
+value
+The Obj to store.
+
+
+
+Fetch
+
+cfish_Obj*
+cfish_Hash_Fetch(
+cfish_Hash *self,
+cfish_String *key
+);
+
+Fetch the value associated with key.
+Returns: the value, or NULL if key is not 
present.
+
+Fetch_Utf8
+
+cfish_Obj*
+cfish_Hash_Fetch_Utf8(
+cfish_Hash *self,
+char *utf8,
+size_t size
+);
+
+Fetch the value associated with a raw UTF-8 key.
+
+utf8
+Pointer to UTF-8 character data of the key.
+
+size
+Size of UTF-8 character data in bytes.
+
+
+Returns: the value, or NULL if key is not 
present.
+
+Delete
+
+cfish_Obj* // 
incremented
+cfish_Hash_Delete(
+cfish_Hash *self,
+cfish_String *key
+);
+
+Attempt to delete a key-value pair from the hash.
+Returns: the value if key exists and thus 
deletion
+succeeds; otherwise NULL.
+
+Delete_Utf8
+
+cfish_Obj* // 
incremented
+cfish_Hash_Delete_Utf8(
+cfish_Hash *self,
+char *utf8,
+size_t size
+);
+
+Attempt to delete a key-value pair from the hash.
+
+utf8
+Pointer to UTF-8 character data of the key.
+
+size
+Size of UTF-8 character data in bytes.
+
+
+Returns: the value if key exists and thus 
deletion
+succeeds; otherwise NULL.
+
+Has_Key
+
+bool
+cfish_Hash_Has_Key(
+cfish_Hash *self,
+cfish_String *key
+);
+
+Indicate whether the supplied key is present.
+
+Keys
+
+cfish_Vector* // 
incremented
+cfish_Hash_Keys(
+cfish_Hash *self
+);
+
+Return the Hash’s keys.
+
+Values
+
+cfish_Vector* // 
incremented
+cfish_Hash_Values(
+cfish_Hash *self
+);
+
+Return the Hash’s values.
+
+Get_Size
+
+size_t
+cfish_Hash_Get_Size(
+cfish_Hash *self
+);
+
+Return the number of key-value pairs.
+
+Equals
+
+bool
+cfish_Hash_Equals(
+cfish_Hash *self,
+cfish_Obj 
*other
+);
+
+Equality test.
+Returns: true if other is a Hash with the 
same key-value pairs as
+self.  Keys and values are compared using their respective 
Equals
+methods.
+
+Destroy
+
+void
+cfish_Hash_Destroy(
+cfish_Hash *self
+);
+
+Generic destructor.  Frees the struct itself but not any complex
+member elements.
+
+
+Inheritance
+Clownfish::Hash is a Clownfish::Obj.
+

Added: lucy/site/trunk/content/docs/c/Clownfish/HashIterator.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Clownfish/HashIterator.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Clownfish/HashIterator.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Clownfish/HashIterator.mdtext Mon Apr  4 
12:55:10 2016
@@ -0,0 +1,99 @@
+Title: Clownfish::HashIterator – C API Documentation
+
+
+Clownfish::HashIterator
+
+
+parcel
+Clownfish
+
+
+class variable
+CFISH_HASHITERATOR
+
+
+struct symbol
+cfish_HashIterator
+
+
+class nickname
+cfish_HashIter
+
+
+header file
+Clownfish/HashIterator.h
+
+
+Name
+Clownfish::HashIterator – Hashtable Iterator.
+Functions
+
+new
+
+cfish_HashIterator* // incremented
+cfish_HashIter_new(
+cfish_Hash *hash
+);
+
+Return a HashIterator for hash.
+
+init
+
+cfish_HashIterator*
+cfish_HashIter_init(
+cfish_HashIterator *self,
+cfish_Hash *hash
+);
+
+Initialize a HashIterator for hash.
+
+
+Methods
+
+Next
+
+bool
+cfish_HashIter_Next(
+cfish_HashIterator *self
+);
+
+Advance the iterator to the next key-value 

svn commit: r1737682 [3/8] - in /lucy/site/trunk/content: css/ docs/ docs/c/ docs/c/Clownfish/ docs/c/Clownfish/Docs/ docs/c/Lucy/ docs/c/Lucy/Analysis/ docs/c/Lucy/Docs/ docs/c/Lucy/Docs/Cookbook/ do

2016-04-04 Thread nwellnhof
Added: lucy/site/trunk/content/docs/c/Lucy/Analysis/Normalizer.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Analysis/Normalizer.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Lucy/Analysis/Normalizer.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Lucy/Analysis/Normalizer.mdtext Mon Apr  4 
12:55:10 2016
@@ -0,0 +1,157 @@
+Title: Lucy::Analysis::Normalizer – C API Documentation
+
+
+Lucy::Analysis::Normalizer
+
+
+parcel
+Lucy
+
+
+class variable
+LUCY_NORMALIZER
+
+
+struct symbol
+lucy_Normalizer
+
+
+class nickname
+lucy_Normalizer
+
+
+header file
+Lucy/Analysis/Normalizer.h
+
+
+Name
+Lucy::Analysis::Normalizer – Unicode normalization, case folding and 
accent stripping.
+Description
+Normalizer is an Analyzer 
which normalizes
+tokens to one of the Unicode normalization forms. Optionally, it
+performs Unicode case folding and converts accented characters to their
+base character.
+If you use highlighting, Normalizer should be run after tokenization
+because it might add or remove characters.
+Functions
+
+new
+
+lucy_Normalizer* // incremented
+lucy_Normalizer_new(
+cfish_String 
*normalization_form,
+bool case_fold,
+bool strip_accents
+);
+
+Create a new Normalizer.
+
+normalization_form
+Unicode normalization form, can be one of
+‘NFC’, ‘NFKC’, ‘NFD’, ‘NFKD’. Defaults to ‘NFKC’.
+
+case_fold
+Perform case folding, default is true.
+
+strip_accents
+Strip accents, default is false.
+
+
+
+init
+
+lucy_Normalizer*
+lucy_Normalizer_init(
+lucy_Normalizer *self,
+cfish_String 
*normalization_form,
+bool case_fold,
+bool strip_accents
+);
+
+Initialize a Normalizer.
+
+normalization_form
+Unicode normalization form, can be one of
+‘NFC’, ‘NFKC’, ‘NFD’, ‘NFKD’. Defaults to ‘NFKC’.
+
+case_fold
+Perform case folding, default is true.
+
+strip_accents
+Strip accents, default is false.
+
+
+
+
+Methods
+
+Transform
+
+lucy_Inversion* // incremented
+lucy_Normalizer_Transform(
+lucy_Normalizer *self,
+lucy_Inversion 
*inversion
+);
+
+Take a single Inversion as 
input
+and returns an Inversion, either the same one (presumably transformed
+in some way), or a new one.
+
+inversion
+An inversion.
+
+
+
+Dump
+
+cfish_Hash* // 
incremented
+lucy_Normalizer_Dump(
+lucy_Normalizer *self
+);
+
+Dump the analyzer as hash.
+Subclasses should call Dump() on the 
superclass. The returned
+object is a hash which should be populated with parameters of
+the analyzer.
+Returns: A hash containing a description of the 
analyzer.
+
+Load
+
+lucy_Normalizer* // incremented
+lucy_Normalizer_Load(
+lucy_Normalizer *self,
+cfish_Obj *dump
+);
+
+Reconstruct an analyzer from a dump.
+Subclasses should first call Load() on the 
superclass. The
+returned object is an analyzer which should be reconstructed by
+setting the dumped parameters from the hash contained in dump.
+Note that the invocant analyzer is unused.
+
+dump
+A hash.
+
+
+Returns: An analyzer.
+
+Equals
+
+bool
+lucy_Normalizer_Equals(
+lucy_Normalizer *self,
+cfish_Obj *other
+);
+
+Indicate whether two objects are the same.  By default, compares the
+memory address.
+
+other
+Another Obj.
+
+
+
+
+Inheritance
+Lucy::Analysis::Normalizer is a Lucy::Analysis::Analyzer is a Clownfish::Obj.
+

Added: lucy/site/trunk/content/docs/c/Lucy/Analysis/PolyAnalyzer.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Analysis/PolyAnalyzer.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Lucy/Analysis/PolyAnalyzer.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Lucy/Analysis/PolyAnalyzer.mdtext Mon Apr  4 
12:55:10 2016
@@ -0,0 +1,216 @@
+Title: Lucy::Analysis::PolyAnalyzer – C API Documentation
+
+
+Lucy::Analysis::PolyAnalyzer
+
+
+parcel
+Lucy
+
+
+class variable
+LUCY_POLYANALYZER
+
+
+struct symbol
+lucy_PolyAnalyzer
+
+
+class nickname
+lucy_PolyAnalyzer
+
+
+header file
+Lucy/Analysis/PolyAnalyzer.h
+
+
+Name
+Lucy::Analysis::PolyAnalyzer – Multiple Analyzers in series.
+Description
+A PolyAnalyzer is a series of Analyzers,
+each of which will be called upon to “analyze” text in turn.  You can
+either provide the Analyzers yourself, or you can specify a supported
+language, in which case a PolyAnalyzer consisting of a
+CaseFolder, a
+RegexTokenizer, and a
+SnowballStemmer will be 
generated for you.
+The language parameter is DEPRECATED. Use
+EasyAnalyzer instead.
+Supported languages:
+en = English,
+da = Danish,
+de = German,
+es = Spanish,
+fi = Finnish,
+fr = French,
+hu = Hungarian,
+it = Italian,
+nl = Dutch,
+no = Norwegian,
+pt = Portuguese,
+ro = Romanian,
+ru = Russian,
+sv = Swedish,
+tr = Turkish,
+
+Functions
+
+new
+
+lucy_PolyAnalyzer* // incremented
+lucy_PolyAnalyzer_new(
+cfish_String *language,
+

svn commit: r1737682 [6/8] - in /lucy/site/trunk/content: css/ docs/ docs/c/ docs/c/Clownfish/ docs/c/Clownfish/Docs/ docs/c/Lucy/ docs/c/Lucy/Analysis/ docs/c/Lucy/Docs/ docs/c/Lucy/Docs/Cookbook/ do

2016-04-04 Thread nwellnhof
Added: lucy/site/trunk/content/docs/c/Lucy/Object/I32Array.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Object/I32Array.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Lucy/Object/I32Array.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Lucy/Object/I32Array.mdtext Mon Apr  4 
12:55:10 2016
@@ -0,0 +1,106 @@
+Title: Lucy::Object::I32Array – C API Documentation
+
+
+Lucy::Object::I32Array
+
+
+parcel
+Lucy
+
+
+class variable
+LUCY_I32ARRAY
+
+
+struct symbol
+lucy_I32Array
+
+
+class nickname
+lucy_I32Arr
+
+
+header file
+Lucy/Object/I32Array.h
+
+
+Name
+Lucy::Object::I32Array
+Functions
+
+new
+
+lucy_I32Array* // 
incremented
+lucy_I32Arr_new(
+int32_t *ints,
+uint32_t size
+);
+
+
+new_blank
+
+lucy_I32Array* // 
incremented
+lucy_I32Arr_new_blank(
+uint32_t size
+);
+
+
+init
+
+lucy_I32Array*
+lucy_I32Arr_init(
+lucy_I32Array *self,
+int32_t *ints,
+uint32_t size
+);
+
+
+
+Methods
+
+Set
+
+void
+lucy_I32Arr_Set(
+lucy_I32Array *self,
+uint32_t tick,
+int32_t value
+);
+
+Set the value at tick, or throw an error if
+tick is out of bounds.
+
+Get
+
+int32_t
+lucy_I32Arr_Get(
+lucy_I32Array *self,
+uint32_t tick
+);
+
+Return the value at tick, or throw an error if
+tick is out of bounds.
+
+Get_Size
+
+uint32_t
+lucy_I32Arr_Get_Size(
+lucy_I32Array *self
+);
+
+Accessor for ‘size’ member.
+
+Destroy
+
+void
+lucy_I32Arr_Destroy(
+lucy_I32Array *self
+);
+
+Generic destructor.  Frees the struct itself but not any complex
+member elements.
+
+
+Inheritance
+Lucy::Object::I32Array is a Clownfish::Obj.
+

Added: lucy/site/trunk/content/docs/c/Lucy/Plan/Architecture.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Plan/Architecture.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Lucy/Plan/Architecture.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Lucy/Plan/Architecture.mdtext Mon Apr  4 
12:55:10 2016
@@ -0,0 +1,102 @@
+Title: Lucy::Plan::Architecture – C API Documentation
+
+
+Lucy::Plan::Architecture
+
+
+parcel
+Lucy
+
+
+class variable
+LUCY_ARCHITECTURE
+
+
+struct symbol
+lucy_Architecture
+
+
+class nickname
+lucy_Arch
+
+
+header file
+Lucy/Plan/Architecture.h
+
+
+Name
+Lucy::Plan::Architecture – Configure major components of an index.
+Description
+By default, a Lucy index consists of several main parts: lexicon,
+postings, stored documents, deletions, and highlight data.  The readers and
+writers for that data are spawned by Architecture.  Each component operates
+at the segment level; Architecture’s factory methods are used to build up
+SegWriter and
+SegReader.
+Functions
+
+new
+
+lucy_Architecture* // incremented
+lucy_Arch_new(void);
+
+Constructor.  Takes no arguments.
+
+init
+
+lucy_Architecture*
+lucy_Arch_init(
+lucy_Architecture *self
+);
+
+Initialize an Architecture.
+
+
+Methods
+
+Register_Doc_Writer
+
+void
+lucy_Arch_Register_Doc_Writer(
+lucy_Architecture *self,
+lucy_SegWriter *writer
+);
+
+Spawn a DataWriter and Register() it with the 
supplied SegWriter,
+adding it to the SegWriter’s writer stack.
+
+writer
+A SegWriter.
+
+
+
+Register_Doc_Reader
+
+void
+lucy_Arch_Register_Doc_Reader(
+lucy_Architecture *self,
+lucy_SegReader *reader
+);
+
+Spawn a DocReader and register it with the supplied SegReader.
+
+reader
+A SegReader.
+
+
+
+Equals
+
+bool
+lucy_Arch_Equals(
+lucy_Architecture *self,
+cfish_Obj *other
+);
+
+Returns true for any Architecture object. Subclasses should override
+this weak check.
+
+
+Inheritance
+Lucy::Plan::Architecture is a Clownfish::Obj.
+

Added: lucy/site/trunk/content/docs/c/Lucy/Plan/BlobType.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Plan/BlobType.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Lucy/Plan/BlobType.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Lucy/Plan/BlobType.mdtext Mon Apr  4 
12:55:10 2016
@@ -0,0 +1,98 @@
+Title: Lucy::Plan::BlobType – C API Documentation
+
+
+Lucy::Plan::BlobType
+
+
+parcel
+Lucy
+
+
+class variable
+LUCY_BLOBTYPE
+
+
+struct symbol
+lucy_BlobType
+
+
+class nickname
+lucy_BlobType
+
+
+header file
+Lucy/Plan/BlobType.h
+
+
+Name
+Lucy::Plan::BlobType – Default behaviors for binary fields.
+Description
+BlobType is an implementation of FieldType tuned for use with fields
+containing binary data, which cannot be indexed or searched – only 
stored.
+Functions
+
+new
+
+lucy_BlobType* // 
incremented
+lucy_BlobType_new(
+bool stored
+);
+
+Create a new BlobType.
+
+stored
+boolean indicating whether the field should be stored.
+
+
+
+init
+
+lucy_BlobType*
+lucy_BlobType_init(
+lucy_BlobType *self,
+bool stored
+);
+

svn commit: r1737682 [8/8] - in /lucy/site/trunk/content: css/ docs/ docs/c/ docs/c/Clownfish/ docs/c/Clownfish/Docs/ docs/c/Lucy/ docs/c/Lucy/Analysis/ docs/c/Lucy/Docs/ docs/c/Lucy/Docs/Cookbook/ do

2016-04-04 Thread nwellnhof
Added: lucy/site/trunk/content/docs/c/Lucy/Store/FSFolder.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Store/FSFolder.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Lucy/Store/FSFolder.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Lucy/Store/FSFolder.mdtext Mon Apr  4 
12:55:10 2016
@@ -0,0 +1,65 @@
+Title: Lucy::Store::FSFolder – C API Documentation
+
+
+Lucy::Store::FSFolder
+
+
+parcel
+Lucy
+
+
+class variable
+LUCY_FSFOLDER
+
+
+struct symbol
+lucy_FSFolder
+
+
+class nickname
+lucy_FSFolder
+
+
+header file
+Lucy/Store/FSFolder.h
+
+
+Name
+Lucy::Store::FSFolder – File System implementation of Folder.
+Description
+Implementation of Folder using a 
single file system
+directory and multiple files.
+Functions
+
+new
+
+lucy_FSFolder* // 
incremented
+lucy_FSFolder_new(
+cfish_String *path
+);
+
+Create a new Folder.
+
+path
+Location of the index. If the specified directory does
+not exist already, it will NOT be created, in order to prevent
+misconfigured read applications from spawning bogus files – so it may
+be necessary to create the directory yourself.
+
+
+
+init
+
+lucy_FSFolder*
+lucy_FSFolder_init(
+lucy_FSFolder *self,
+cfish_String *path
+);
+
+Initialize a Folder.  See new() for a description of 
the
+parameters.
+
+
+Inheritance
+Lucy::Store::FSFolder is a Lucy::Store::Folder is a Clownfish::Obj.
+

Added: lucy/site/trunk/content/docs/c/Lucy/Store/Folder.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Store/Folder.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Lucy/Store/Folder.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Lucy/Store/Folder.mdtext Mon Apr  4 12:55:10 
2016
@@ -0,0 +1,51 @@
+Title: Lucy::Store::Folder – C API Documentation
+
+
+Lucy::Store::Folder
+
+
+parcel
+Lucy
+
+
+class variable
+LUCY_FOLDER
+
+
+struct symbol
+lucy_Folder
+
+
+class nickname
+lucy_Folder
+
+
+header file
+Lucy/Store/Folder.h
+
+
+Name
+Lucy::Store::Folder – Abstract class representing a directory.
+Description
+A “file” within a Folder might be a real file on disk – or it might 
be a
+RAM buffer.  Similarly, Delete() might delete a file from the file system, or
+a key-value pair from a hash, or something else.
+The archetypal implementation of Folder,
+FSFolder, represents a directory 
on
+the file system holding a collection of files.
+Methods
+
+Destroy
+
+void
+lucy_Folder_Destroy(
+lucy_Folder *self
+);
+
+Generic destructor.  Frees the struct itself but not any complex
+member elements.
+
+
+Inheritance
+Lucy::Store::Folder is a Clownfish::Obj.
+

Added: lucy/site/trunk/content/docs/c/Lucy/Store/Lock.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Store/Lock.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Lucy/Store/Lock.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Lucy/Store/Lock.mdtext Mon Apr  4 12:55:10 
2016
@@ -0,0 +1,155 @@
+Title: Lucy::Store::Lock – C API Documentation
+
+
+Lucy::Store::Lock
+
+
+parcel
+Lucy
+
+
+class variable
+LUCY_LOCK
+
+
+struct symbol
+lucy_Lock
+
+
+class nickname
+lucy_Lock
+
+
+header file
+Lucy/Store/Lock.h
+
+
+Name
+Lucy::Store::Lock – Abstract class representing an interprocess mutex 
lock.
+Description
+The Lock class produces an interprocess mutex lock.  The default subclass
+uses dot-lock files, but alternative implementations are possible.
+Each lock must have a name which is unique per resource to be locked.  Each
+lock also has a “host” id which should be unique per machine; it is used to
+help clear away stale locks.
+Functions
+
+init
+
+lucy_Lock*
+lucy_Lock_init(
+lucy_Lock *self,
+lucy_Folder *folder,
+cfish_String *name,
+cfish_String *host,
+int32_t timeout,
+int32_t interval
+);
+
+Abstract initializer.
+
+folder
+A Folder.
+
+name
+String identifying the resource to be locked, which must
+consist solely of characters matching [-_.A-Za-z0-9].
+
+host
+A unique per-machine identifier.
+
+timeout
+Time in milliseconds to keep retrying before abandoning
+the attempt to Obtain() a 
lock.
+
+interval
+Time in milliseconds between retries.
+
+
+
+
+Methods
+
+Shared (abstract)
+
+bool
+lucy_Lock_Shared(
+lucy_Lock *self
+);
+
+Returns true if the Lock is shared, false if the Lock is exclusive.
+
+Obtain
+
+bool
+lucy_Lock_Obtain(
+lucy_Lock *self
+);
+
+Call Request() once 
per interval until Request() returns
+success or the timeout has been reached.
+Returns: true on success, false on failure (sets the 
global error object
+returned by get_error()).
+
+Request (abstract)
+
+bool
+lucy_Lock_Request(
+lucy_Lock *self
+);
+
+Make one attempt to acquire the lock.
+The semantics of Request() differ 

svn commit: r1737682 [4/8] - in /lucy/site/trunk/content: css/ docs/ docs/c/ docs/c/Clownfish/ docs/c/Clownfish/Docs/ docs/c/Lucy/ docs/c/Lucy/Analysis/ docs/c/Lucy/Docs/ docs/c/Lucy/Docs/Cookbook/ do

2016-04-04 Thread nwellnhof
Added: lucy/site/trunk/content/docs/c/Lucy/Docs/IRTheory.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Docs/IRTheory.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Lucy/Docs/IRTheory.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Lucy/Docs/IRTheory.mdtext Mon Apr  4 
12:55:10 2016
@@ -0,0 +1,45 @@
+Title: Lucy::Docs::IRTheory
+
+
+Crash course in information retrieval
+Just enough Information Retrieval theory to find your way around Apache 
Lucy.
+Terminology
+Lucy uses some terminology from the field of information retrieval which
+may be unfamiliar to many users.  “Document” and “term” mean pretty 
much what
+you’d expect them to, but others such as “posting” and “inverted 
index” need a
+formal introduction:
+
+document - An atomic unit of retrieval.
+term - An attribute which describes a document.
+posting - One term indexing one document.
+term list - The complete list of terms which describe a 
document.
+posting list - The complete list of documents which a term 
indexes.
+inverted index - A data structure which maps from terms to 
documents.
+
+Since Lucy is a practical implementation of IR theory, it loads these
+abstract, distilled definitions down with useful traits.  For instance, a
+“posting” in its most rarefied form is simply a term-document pairing; in
+Lucy, the class MatchPosting fills this
+role.  However, by associating additional information with a posting like the
+number of times the term occurs in the document, we can turn it into a
+ScorePosting, making it possible
+to rank documents by relevance rather than just list documents which happen to
+match in no particular order.
+TF/IDF ranking algorithm
+Lucy uses a variant of the well-established “Term Frequency / Inverse
+Document Frequency” weighting scheme.  A thorough treatment of TF/IDF is too
+ambitious for our present purposes, but in a nutshell, it means that…
+
+
+in a search for skate park, documents which score well for the
+comparatively rare term skate will rank higher than documents 
which score
+well for the more common term park.
+
+
+a 10-word text which has one occurrence each of both skate and 
park will
+rank higher than a 1000-word text which also contains one occurrence of 
each.
+
+
+A web search for “tf idf” will turn up many excellent explanations of 
the
+algorithm.
+

Added: lucy/site/trunk/content/docs/c/Lucy/Docs/Tutorial.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Docs/Tutorial.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Lucy/Docs/Tutorial.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Lucy/Docs/Tutorial.mdtext Mon Apr  4 
12:55:10 2016
@@ -0,0 +1,54 @@
+Title: Lucy::Docs::Tutorial
+
+
+Step-by-step introduction to Apache Lucy.
+Explore Apache Lucy’s basic functionality by starting with a minimalist 
CGI
+search app based on Lucy::Simple and transforming it, step by step,
+into an “advanced search” interface utilizing more flexible core modules 
like
+Indexer and IndexSearcher.
+Chapters
+
+
+SimpleTutorial - 
Build a bare-bones search app using
+Lucy::Simple.
+
+
+BeyondSimpleTutorial
 - Rebuild the app using core
+classes like Indexer and
+IndexSearcher in place of 
Lucy::Simple.
+
+
+FieldTypeTutorial - 
Experiment with different field
+characteristics using subclasses of FieldType.
+
+
+AnalysisTutorial - 
Examine how the choice of
+Analyzer subclass affects 
search results.
+
+
+HighlighterTutorial
 - Augment search results with
+highlighted excerpts.
+
+
+QueryObjectsTutorial
 - Unlock advanced search features
+by using Query objects instead of query strings.
+
+
+Source materials
+The source material used by the tutorial app – a multi-text-file 
presentation
+of the United States constitution – can be found in the sample 
directory
+at the root of the Lucy distribution, along with finished indexing and search
+apps.
+sample/indexer_simple.c  # simple indexing 
executable
+sample/search_simple.c   # simple search executable
+sample/indexer.c # indexing executable
+sample/search.c  # search executable
+sample/us_constitution   # corpus
+
+Conventions
+The user is expected to be familiar with OO Perl and basic CGI 
programming.
+The code in this tutorial assumes a Unix-flavored operating system and the
+Apache webserver, but will work with minor modifications on other setups.
+See also
+More advanced and esoteric subjects are covered in Cookbook.
+

Added: lucy/site/trunk/content/docs/c/Lucy/Docs/Tutorial/AnalysisTutorial.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Docs/Tutorial/AnalysisTutorial.mdtext?rev=1737682=auto
==
--- 

svn commit: r1737682 [5/8] - in /lucy/site/trunk/content: css/ docs/ docs/c/ docs/c/Clownfish/ docs/c/Clownfish/Docs/ docs/c/Lucy/ docs/c/Lucy/Analysis/ docs/c/Lucy/Docs/ docs/c/Lucy/Docs/Cookbook/ do

2016-04-04 Thread nwellnhof
Added: lucy/site/trunk/content/docs/c/Lucy/Index/IndexManager.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Index/IndexManager.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Lucy/Index/IndexManager.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Lucy/Index/IndexManager.mdtext Mon Apr  4 
12:55:10 2016
@@ -0,0 +1,201 @@
+Title: Lucy::Index::IndexManager – C API Documentation
+
+
+Lucy::Index::IndexManager
+
+
+parcel
+Lucy
+
+
+class variable
+LUCY_INDEXMANAGER
+
+
+struct symbol
+lucy_IndexManager
+
+
+class nickname
+lucy_IxManager
+
+
+header file
+Lucy/Index/IndexManager.h
+
+
+Name
+Lucy::Index::IndexManager – Policies governing index updating, locking, 
and file deletion.
+Description
+IndexManager is an advanced-use class for controlling index locking,
+updating, merging, and deletion behaviors.
+IndexManager and Architecture are
+complementary classes: Architecture is used to define traits and behaviors
+which cannot change for the life of an index; IndexManager is used for
+defining rules which may change from process to process.
+Functions
+
+new
+
+lucy_IndexManager* // incremented
+lucy_IxManager_new(
+cfish_String *host,
+lucy_LockFactory 
*lock_factory
+);
+
+Create a new IndexManager.
+
+host
+An identifier which should be unique per-machine.
+
+lock_factory
+A LockFactory.
+
+
+
+init
+
+lucy_IndexManager*
+lucy_IxManager_init(
+lucy_IndexManager *self,
+cfish_String *host,
+lucy_LockFactory 
*lock_factory
+);
+
+Initialize an IndexManager.
+
+host
+An identifier which should be unique per-machine.
+
+lock_factory
+A LockFactory.
+
+
+
+
+Methods
+
+Destroy
+
+void
+lucy_IxManager_Destroy(
+lucy_IndexManager *self
+);
+
+Generic destructor.  Frees the struct itself but not any complex
+member elements.
+
+Set_Folder
+
+void
+lucy_IxManager_Set_Folder(
+lucy_IndexManager *self,
+lucy_Folder *folder
+);
+
+Setter for folder member.  Typical clients (Indexer,
+IndexReader) will use this method to install their own Folder instance.
+
+Get_Folder
+
+lucy_Folder*
+lucy_IxManager_Get_Folder(
+lucy_IndexManager *self
+);
+
+Getter for folder member.
+
+Get_Host
+
+cfish_String*
+lucy_IxManager_Get_Host(
+lucy_IndexManager *self
+);
+
+Getter for host member.
+
+Recycle
+
+cfish_Vector* // 
incremented
+lucy_IxManager_Recycle(
+lucy_IndexManager *self,
+lucy_PolyReader *reader,
+lucy_DeletionsWriter 
*del_writer,
+int64_t cutoff,
+bool optimize
+);
+
+Return an array of SegReaders representing segments that should be
+consolidated.  Implementations must balance index-time churn against
+search-time degradation due to segment proliferation. The default
+implementation prefers small segments or segments with a high
+proportion of deletions.
+
+reader
+A PolyReader.
+
+del_writer
+A DeletionsWriter.
+
+cutoff
+A segment number which all returned SegReaders must
+exceed.
+
+optimize
+A boolean indicating whether to spend extra time
+optimizing the index for search-time performance.
+
+
+
+Make_Write_Lock
+
+lucy_Lock* // 
incremented
+lucy_IxManager_Make_Write_Lock(
+lucy_IndexManager *self
+);
+
+Create the Lock which controls access to modifying the logical content
+of the index.
+
+Set_Write_Lock_Timeout
+
+void
+lucy_IxManager_Set_Write_Lock_Timeout(
+lucy_IndexManager *self,
+uint32_t timeout
+);
+
+Setter for write lock timeout.  Default: 1000 milliseconds.
+
+Get_Write_Lock_Timeout
+
+uint32_t
+lucy_IxManager_Get_Write_Lock_Timeout(
+lucy_IndexManager *self
+);
+
+Getter for write lock timeout.
+
+Set_Write_Lock_Interval
+
+void
+lucy_IxManager_Set_Write_Lock_Interval(
+lucy_IndexManager *self,
+uint32_t timeout
+);
+
+Setter for write lock retry interval.  Default: 100 milliseconds.
+
+Get_Write_Lock_Interval
+
+uint32_t
+lucy_IxManager_Get_Write_Lock_Interval(
+lucy_IndexManager *self
+);
+
+Getter for write lock retry interval.
+
+
+Inheritance
+Lucy::Index::IndexManager is a Clownfish::Obj.
+

Added: lucy/site/trunk/content/docs/c/Lucy/Index/IndexReader.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Index/IndexReader.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Lucy/Index/IndexReader.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Lucy/Index/IndexReader.mdtext Mon Apr  4 
12:55:10 2016
@@ -0,0 +1,195 @@
+Title: Lucy::Index::IndexReader – C API Documentation
+
+
+Lucy::Index::IndexReader
+
+
+parcel
+Lucy
+
+
+class variable
+LUCY_INDEXREADER
+
+
+struct symbol
+lucy_IndexReader
+
+
+class nickname
+lucy_IxReader
+
+
+header file
+Lucy/Index/IndexReader.h
+
+
+Name
+Lucy::Index::IndexReader – Read from an inverted index.
+Description
+IndexReader is the interface through which
+IndexSearcher objects 
access the
+content of an index.
+IndexReader objects 

svn commit: r1737682 [1/8] - in /lucy/site/trunk/content: css/ docs/ docs/c/ docs/c/Clownfish/ docs/c/Clownfish/Docs/ docs/c/Lucy/ docs/c/Lucy/Analysis/ docs/c/Lucy/Docs/ docs/c/Lucy/Docs/Cookbook/ do

2016-04-04 Thread nwellnhof
Author: nwellnhof
Date: Mon Apr  4 12:55:10 2016
New Revision: 1737682

URL: http://svn.apache.org/viewvc?rev=1737682=rev
Log:
Add C API documentation for 0.5.0 release

Added:
lucy/site/trunk/content/docs/c/
lucy/site/trunk/content/docs/c/Clownfish/
lucy/site/trunk/content/docs/c/Clownfish.mdtext
lucy/site/trunk/content/docs/c/Clownfish/Blob.mdtext
lucy/site/trunk/content/docs/c/Clownfish/Boolean.mdtext
lucy/site/trunk/content/docs/c/Clownfish/ByteBuf.mdtext
lucy/site/trunk/content/docs/c/Clownfish/CharBuf.mdtext
lucy/site/trunk/content/docs/c/Clownfish/Class.mdtext
lucy/site/trunk/content/docs/c/Clownfish/Docs/
lucy/site/trunk/content/docs/c/Clownfish/Docs/BuildingProjects.mdtext
lucy/site/trunk/content/docs/c/Clownfish/Docs/ClassIntro.mdtext
lucy/site/trunk/content/docs/c/Clownfish/Docs/WritingClasses.mdtext
lucy/site/trunk/content/docs/c/Clownfish/Err.mdtext
lucy/site/trunk/content/docs/c/Clownfish/Float.mdtext
lucy/site/trunk/content/docs/c/Clownfish/Hash.mdtext
lucy/site/trunk/content/docs/c/Clownfish/HashIterator.mdtext
lucy/site/trunk/content/docs/c/Clownfish/Integer.mdtext
lucy/site/trunk/content/docs/c/Clownfish/Obj.mdtext
lucy/site/trunk/content/docs/c/Clownfish/String.mdtext
lucy/site/trunk/content/docs/c/Clownfish/StringIterator.mdtext
lucy/site/trunk/content/docs/c/Clownfish/Vector.mdtext
lucy/site/trunk/content/docs/c/Lucy/
lucy/site/trunk/content/docs/c/Lucy/Analysis/
lucy/site/trunk/content/docs/c/Lucy/Analysis/Analyzer.mdtext
lucy/site/trunk/content/docs/c/Lucy/Analysis/CaseFolder.mdtext
lucy/site/trunk/content/docs/c/Lucy/Analysis/EasyAnalyzer.mdtext
lucy/site/trunk/content/docs/c/Lucy/Analysis/Inversion.mdtext
lucy/site/trunk/content/docs/c/Lucy/Analysis/Normalizer.mdtext
lucy/site/trunk/content/docs/c/Lucy/Analysis/PolyAnalyzer.mdtext
lucy/site/trunk/content/docs/c/Lucy/Analysis/RegexTokenizer.mdtext
lucy/site/trunk/content/docs/c/Lucy/Analysis/SnowballStemmer.mdtext
lucy/site/trunk/content/docs/c/Lucy/Analysis/SnowballStopFilter.mdtext
lucy/site/trunk/content/docs/c/Lucy/Analysis/StandardTokenizer.mdtext
lucy/site/trunk/content/docs/c/Lucy/Analysis/Token.mdtext
lucy/site/trunk/content/docs/c/Lucy/Docs/
lucy/site/trunk/content/docs/c/Lucy/Docs/Cookbook/
lucy/site/trunk/content/docs/c/Lucy/Docs/Cookbook.mdtext
lucy/site/trunk/content/docs/c/Lucy/Docs/Cookbook/CustomQuery.mdtext
lucy/site/trunk/content/docs/c/Lucy/Docs/Cookbook/CustomQueryParser.mdtext
lucy/site/trunk/content/docs/c/Lucy/Docs/Cookbook/FastUpdates.mdtext
lucy/site/trunk/content/docs/c/Lucy/Docs/DevGuide.mdtext
lucy/site/trunk/content/docs/c/Lucy/Docs/DocIDs.mdtext
lucy/site/trunk/content/docs/c/Lucy/Docs/FileFormat.mdtext
lucy/site/trunk/content/docs/c/Lucy/Docs/FileLocking.mdtext
lucy/site/trunk/content/docs/c/Lucy/Docs/IRTheory.mdtext
lucy/site/trunk/content/docs/c/Lucy/Docs/Tutorial/
lucy/site/trunk/content/docs/c/Lucy/Docs/Tutorial.mdtext
lucy/site/trunk/content/docs/c/Lucy/Docs/Tutorial/AnalysisTutorial.mdtext

lucy/site/trunk/content/docs/c/Lucy/Docs/Tutorial/BeyondSimpleTutorial.mdtext
lucy/site/trunk/content/docs/c/Lucy/Docs/Tutorial/FieldTypeTutorial.mdtext
lucy/site/trunk/content/docs/c/Lucy/Docs/Tutorial/HighlighterTutorial.mdtext

lucy/site/trunk/content/docs/c/Lucy/Docs/Tutorial/QueryObjectsTutorial.mdtext
lucy/site/trunk/content/docs/c/Lucy/Docs/Tutorial/SimpleTutorial.mdtext
lucy/site/trunk/content/docs/c/Lucy/Document/
lucy/site/trunk/content/docs/c/Lucy/Document/Doc.mdtext
lucy/site/trunk/content/docs/c/Lucy/Document/HitDoc.mdtext
lucy/site/trunk/content/docs/c/Lucy/Highlight/
lucy/site/trunk/content/docs/c/Lucy/Highlight/Highlighter.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/
lucy/site/trunk/content/docs/c/Lucy/Index/BackgroundMerger.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/DataReader.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/DataWriter.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/DeletionsWriter.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/DocReader.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/IndexManager.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/IndexReader.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/Indexer.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/Lexicon.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/LexiconReader.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/PolyReader.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/PostingList.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/PostingListReader.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/SegReader.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/SegWriter.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/Segment.mdtext
lucy/site/trunk/content/docs/c/Lucy/Index/Similarity.mdtext
lucy

svn commit: r1737682 [7/8] - in /lucy/site/trunk/content: css/ docs/ docs/c/ docs/c/Clownfish/ docs/c/Clownfish/Docs/ docs/c/Lucy/ docs/c/Lucy/Analysis/ docs/c/Lucy/Docs/ docs/c/Lucy/Docs/Cookbook/ do

2016-04-04 Thread nwellnhof
Added: lucy/site/trunk/content/docs/c/Lucy/Search/ORQuery.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Search/ORQuery.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Lucy/Search/ORQuery.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Lucy/Search/ORQuery.mdtext Mon Apr  4 
12:55:10 2016
@@ -0,0 +1,122 @@
+Title: Lucy::Search::ORQuery – C API Documentation
+
+
+Lucy::Search::ORQuery
+
+
+parcel
+Lucy
+
+
+class variable
+LUCY_ORQUERY
+
+
+struct symbol
+lucy_ORQuery
+
+
+class nickname
+lucy_ORQuery
+
+
+header file
+Lucy/Search/ORQuery.h
+
+
+Name
+Lucy::Search::ORQuery – Union multiple result sets.
+Description
+ORQuery is a composite Query 
which matches
+when any of its children match, so its result set is the union of their
+result sets.  Matching documents recieve a summed score from all matching
+child Queries.
+Functions
+
+new
+
+lucy_ORQuery* // 
incremented
+lucy_ORQuery_new(
+cfish_Vector *children
+);
+
+Create a new ORQuery.
+
+children
+An array of child Queries.
+
+
+
+init
+
+lucy_ORQuery*
+lucy_ORQuery_init(
+lucy_ORQuery *self,
+cfish_Vector *children
+);
+
+Initialize an ORQuery.
+
+children
+An array of child Queries.
+
+
+
+
+Methods
+
+Make_Compiler
+
+lucy_Compiler* // 
incremented
+lucy_ORQuery_Make_Compiler(
+lucy_ORQuery *self,
+lucy_Searcher *searcher,
+float boost,
+bool subordinate
+);
+
+Abstract factory method returning a Compiler derived from this Query.
+
+searcher
+A Searcher.
+
+boost
+A scoring multiplier.
+
+subordinate
+Indicates whether the Query is a subquery (as
+opposed to a top-level query).  If false, the implementation must
+invoke Normalize() on the 
newly minted Compiler object before returning
+it.
+
+
+
+To_String
+
+cfish_String* // 
incremented
+lucy_ORQuery_To_String(
+lucy_ORQuery *self
+);
+
+Generic stringification: “ClassName@hex_mem_address”.
+
+Equals
+
+bool
+lucy_ORQuery_Equals(
+lucy_ORQuery *self,
+cfish_Obj *other
+);
+
+Indicate whether two objects are the same.  By default, compares the
+memory address.
+
+other
+Another Obj.
+
+
+
+
+Inheritance
+Lucy::Search::ORQuery is a Lucy::Search::PolyQuery is a Lucy::Search::Query is a Clownfish::Obj.
+

Added: lucy/site/trunk/content/docs/c/Lucy/Search/PhraseQuery.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Search/PhraseQuery.mdtext?rev=1737682=auto
==
--- lucy/site/trunk/content/docs/c/Lucy/Search/PhraseQuery.mdtext (added)
+++ lucy/site/trunk/content/docs/c/Lucy/Search/PhraseQuery.mdtext Mon Apr  4 
12:55:10 2016
@@ -0,0 +1,173 @@
+Title: Lucy::Search::PhraseQuery – C API Documentation
+
+
+Lucy::Search::PhraseQuery
+
+
+parcel
+Lucy
+
+
+class variable
+LUCY_PHRASEQUERY
+
+
+struct symbol
+lucy_PhraseQuery
+
+
+class nickname
+lucy_PhraseQuery
+
+
+header file
+Lucy/Search/PhraseQuery.h
+
+
+Name
+Lucy::Search::PhraseQuery – Query matching an ordered list of terms.
+Description
+PhraseQuery is a subclass of Query for matching
+against an ordered sequence of terms.
+Functions
+
+new
+
+lucy_PhraseQuery* // incremented
+lucy_PhraseQuery_new(
+cfish_String *field,
+cfish_Vector *terms
+);
+
+Create a new PhraseQuery.
+
+field
+The field that the phrase must occur in.
+
+terms
+The ordered array of terms that must match.
+
+
+
+init
+
+lucy_PhraseQuery*
+lucy_PhraseQuery_init(
+lucy_PhraseQuery *self,
+cfish_String *field,
+cfish_Vector *terms
+);
+
+Initialize a PhraseQuery.
+
+field
+The field that the phrase must occur in.
+
+terms
+The ordered array of terms that must match.
+
+
+
+
+Methods
+
+Get_Field
+
+cfish_String*
+lucy_PhraseQuery_Get_Field(
+lucy_PhraseQuery *self
+);
+
+Accessor for object’s field attribute.
+
+Get_Terms
+
+cfish_Vector*
+lucy_PhraseQuery_Get_Terms(
+lucy_PhraseQuery *self
+);
+
+Accessor for object’s array of terms.
+
+Make_Compiler
+
+lucy_Compiler* // 
incremented
+lucy_PhraseQuery_Make_Compiler(
+lucy_PhraseQuery *self,
+lucy_Searcher *searcher,
+float boost,
+bool subordinate
+);
+
+Abstract factory method returning a Compiler derived from this Query.
+
+searcher
+A Searcher.
+
+boost
+A scoring multiplier.
+
+subordinate
+Indicates whether the Query is a subquery (as
+opposed to a top-level query).  If false, the implementation must
+invoke Normalize() on the 
newly minted Compiler object before returning
+it.
+
+
+
+Equals
+
+bool
+lucy_PhraseQuery_Equals(
+lucy_PhraseQuery *self,
+cfish_Obj *other
+);
+
+Indicate whether two objects are the same.  By default, compares the
+memory address.
+
+other
+Another Obj.
+
+
+
+To_String
+
+cfish_String* // 
incremented
+lucy_PhraseQuery_To_String(
+lucy_PhraseQuery *self
+);
+
+Generic stringification: “ClassName@hex_mem_address”.
+
+Dump
+
+cfish_Obj* // 
incremented

svn commit: r1737643 - /lucy/site/trunk/content/docs/test/

2016-04-04 Thread nwellnhof
Author: nwellnhof
Date: Mon Apr  4 09:23:05 2016
New Revision: 1737643

URL: http://svn.apache.org/viewvc?rev=1737643=rev
Log:
Remove documentation preview

Removed:
lucy/site/trunk/content/docs/test/



svn commit: r1737644 - in /lucy/site/trunk: content/docs/index.mdtext templates/basic.html

2016-04-04 Thread nwellnhof
Author: nwellnhof
Date: Mon Apr  4 09:23:10 2016
New Revision: 1737644

URL: http://svn.apache.org/viewvc?rev=1737644=rev
Log:
Add documentation index page

Added:
lucy/site/trunk/content/docs/index.mdtext
Modified:
lucy/site/trunk/templates/basic.html

Added: lucy/site/trunk/content/docs/index.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/index.mdtext?rev=1737644=auto
==
--- lucy/site/trunk/content/docs/index.mdtext (added)
+++ lucy/site/trunk/content/docs/index.mdtext Mon Apr  4 09:23:10 2016
@@ -0,0 +1,7 @@
+Title: Apache Lucy Documentation
+
+ Perl API
+
+ - [Apache Lucy 0.5.0](perl/)
+ - [Apache Clownfish 0.5.0](perl/clownfish-index.html)
+

Modified: lucy/site/trunk/templates/basic.html
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/templates/basic.html?rev=1737644=1737643=1737644=diff
==
--- lucy/site/trunk/templates/basic.html (original)
+++ lucy/site/trunk/templates/basic.html Mon Apr  4 09:23:10 2016
@@ -52,7 +52,7 @@
 
   Download
   Mailing Lists
-  Documentation
+  Documentation
   http://wiki.apache.org/lucy/;>Wiki
   https://issues.apache.org/jira/browse/LUCY;>Issue 
Tracker
   Version Control




svn commit: r1737645 - in /lucy/site/trunk/content: download.mdtext index.mdtext

2016-04-04 Thread nwellnhof
Author: nwellnhof
Date: Mon Apr  4 09:23:16 2016
New Revision: 1737645

URL: http://svn.apache.org/viewvc?rev=1737645=rev
Log:
Update download links for 0.5.0 release

Modified:
lucy/site/trunk/content/download.mdtext
lucy/site/trunk/content/index.mdtext

Modified: lucy/site/trunk/content/download.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/download.mdtext?rev=1737645=1737644=1737645=diff
==
--- lucy/site/trunk/content/download.mdtext (original)
+++ lucy/site/trunk/content/download.mdtext Mon Apr  4 09:23:16 2016
@@ -1,21 +1,21 @@
 Title: Apache Lucy Downloads
 
- Apache Lucy search engine library, release 0.4.4
+ Apache Lucy search engine library, release 0.5.0
 
- - 
[apache-lucy-0.4.4.tar.gz](http://www.apache.org/dyn/closer.cgi?path=/lucy/apache-lucy-0.4.4.tar.gz)
- - [[OpenPGP]](http://www.apache.org/dist/lucy/apache-lucy-0.4.4.tar.gz.asc)
- - [[MD5]](http://www.apache.org/dist/lucy/apache-lucy-0.4.4.tar.gz.md5)
- - [[SHA512]](http://www.apache.org/dist/lucy/apache-lucy-0.4.4.tar.gz.sha)
- - [CHANGES](http://www.apache.org/dyn/closer.cgi?path=/lucy/CHANGES-0.4.4.txt)
+ - 
[apache-lucy-0.5.0.tar.gz](http://www.apache.org/dyn/closer.cgi?path=/lucy/apache-lucy-0.5.0.tar.gz)
+ - [[OpenPGP]](http://www.apache.org/dist/lucy/apache-lucy-0.5.0.tar.gz.asc)
+ - [[MD5]](http://www.apache.org/dist/lucy/apache-lucy-0.5.0.tar.gz.md5)
+ - [[SHA512]](http://www.apache.org/dist/lucy/apache-lucy-0.5.0.tar.gz.sha)
+ - [CHANGES](http://www.apache.org/dyn/closer.cgi?path=/lucy/CHANGES-0.5.0.txt)
  - [KEYS](http://www.apache.org/dist/lucy/KEYS)
 
- Apache Clownfish symbiotic object system, release 0.4.4
+ Apache Clownfish symbiotic object system, release 0.5.0
 
- - 
[apache-clownfish-0.4.4.tar.gz](http://www.apache.org/dyn/closer.cgi?path=/lucy/clownfish/apache-clownfish-0.4.4.tar.gz)
- - 
[[OpenPGP]](http://www.apache.org/dist/lucy/clownfish/apache-clownfish-0.4.4.tar.gz.asc)
- - 
[[MD5]](http://www.apache.org/dist/lucy/clownfish/apache-clownfish-0.4.4.tar.gz.md5)
- - 
[[SHA512]](http://www.apache.org/dist/lucy/clownfish/apache-clownfish-0.4.4.tar.gz.sha)
- - 
[CHANGES](http://www.apache.org/dyn/closer.cgi?path=/lucy/clownfish/CHANGES-0.4.4.txt)
+ - 
[apache-clownfish-0.5.0.tar.gz](http://www.apache.org/dyn/closer.cgi?path=/lucy/clownfish/apache-clownfish-0.5.0.tar.gz)
+ - 
[[OpenPGP]](http://www.apache.org/dist/lucy/clownfish/apache-clownfish-0.5.0.tar.gz.asc)
+ - 
[[MD5]](http://www.apache.org/dist/lucy/clownfish/apache-clownfish-0.5.0.tar.gz.md5)
+ - 
[[SHA512]](http://www.apache.org/dist/lucy/clownfish/apache-clownfish-0.5.0.tar.gz.sha)
+ - 
[CHANGES](http://www.apache.org/dyn/closer.cgi?path=/lucy/clownfish/CHANGES-0.5.0.txt)
  - [KEYS](http://www.apache.org/dist/lucy/KEYS)
 
  Verifying downloaded files

Modified: lucy/site/trunk/content/index.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/index.mdtext?rev=1737645=1737644=1737645=diff
==
--- lucy/site/trunk/content/index.mdtext (original)
+++ lucy/site/trunk/content/index.mdtext Mon Apr  4 09:23:16 2016
@@ -10,7 +10,7 @@ Lucene™](http://lucene.apache.org/)
 
  Download
 
-The current release of Apache Lucy is [0.4.4](/download.html).
+The current release of Apache Lucy is [0.5.0](/download.html).
 It requires the [Apache Clownfish](/download.html) symbiotic object system.
 
 --




svn commit: r1737642 [5/7] - in /lucy/site/trunk/content/docs: 0.4.0/ 0.4.0/perl/ 0.4.0/perl/Lucy/ 0.4.0/perl/Lucy/Analysis/ 0.4.0/perl/Lucy/Docs/ 0.4.0/perl/Lucy/Docs/Cookbook/ 0.4.0/perl/Lucy/Docs/T

2016-04-04 Thread nwellnhof
Added: lucy/site/trunk/content/docs/perl/Lucy/Index/Indexer.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/perl/Lucy/Index/Indexer.mdtext?rev=1737642=auto
==
--- lucy/site/trunk/content/docs/perl/Lucy/Index/Indexer.mdtext (added)
+++ lucy/site/trunk/content/docs/perl/Lucy/Index/Indexer.mdtext Mon Apr  4 
09:22:30 2016
@@ -0,0 +1,253 @@
+Title: Lucy::Index::Indexer – Apache Lucy Documentation
+
+
+
+
+NAME
+
+Lucy::Index::Indexer - Build inverted indexes.
+
+SYNOPSIS
+
+my $indexer = Lucy::Index::Indexer-new(
+schema = $schema,
+index  = /path/to/index,
+create = 1,
+);
+while ( my ( $title, $content ) = each %source_docs ) {
+$indexer-add_doc({
+title   = $title,
+content = $content,
+});
+}
+$indexer-commit;
+
+DESCRIPTION
+
+The Indexer class is Apache Lucys primary tool for managing the 
content of inverted indexes,
+which may later be searched using IndexSearcher.
+
+In general,
+only one Indexer at a time may write to an index safely.
+If a write lock cannot be secured,
+new() will throw an exception.
+
+If an index is located on a shared volume,
+each writer application must identify itself by supplying an IndexManager with a unique host id to Indexers 
constructor or index corruption will occur.
+See FileLocking for a detailed discussion.
+
+Note: at present,
+delete_by_term() and delete_by_query() only affect documents which had been previously 
committed to the index  and not any documents added this indexing 
session but not yet committed.
+This may change in a future update.
+
+CONSTRUCTORS
+
+new
+
+my $indexer = Lucy::Index::Indexer-new(
+schema   = $schema, # required at index creation
+index= /path/to/index,# required
+create   = 1,   # default: 0
+truncate = 1,   # default: 0
+manager  = $manager # default: created internally
+);
+
+
+schema - A Schema.
+Required when index is being created; if not supplied,
+will be extracted from the index folder.
+
+index - Either a filepath to an index or a Folder.
+
+create - If true and the index directory does not exist,
+attempt to create it.
+
+truncate - If true,
+proceed with the intention of discarding all previous indexing data.
+The old data will remain intact and visible until commit() succeeds.
+
+manager - An IndexManager.
+
+
+METHODS
+
+add_doc
+
+$indexer-add_doc($doc);
+$indexer-add_doc( { field_name = $field_value } );
+$indexer-add_doc(
+doc   = { field_name = $field_value },
+boost = 2.5, # default: 1.0
+);
+
+Add a document to the index.
+Accepts either a single argument or labeled params.
+
+
+doc - Either a Lucy::Document::Doc object,
+or a hashref (which will be attached to a Lucy::Document::Doc object 
internally).
+
+boost - A floating point weight which affects how this document 
scores.
+
+
+add_index
+
+$indexer-add_index($index);
+
+Absorb an existing index into this one.
+The two indexes must have matching Schemas.
+
+
+index - Either an index path name or a Folder.
+
+
+delete_by_term
+
+$indexer-delete_by_term(
+field = $field  # required
+term  = $term   # required
+);
+
+Mark documents which contain the supplied term as deleted,
+so that they will be excluded from search results and eventually removed 
altogether.
+The change is not apparent to search apps until after commit() succeeds.
+
+
+field - The name of an indexed field.
+(If it is not specd as indexed,
+an error will occur.)
+
+term - The term which identifies docs to be marked as deleted.
+If field is associated with an Analyzer,
+term will be processed automatically (so dont pre-process 
it yourself).
+
+
+delete_by_query
+
+$indexer-delete_by_query($query);
+
+Mark documents which match the supplied Query as deleted.
+
+
+query - A Query.
+
+
+delete_by_doc_id
+
+$indexer-delete_by_doc_id($doc_id);
+
+Mark the document identified by the supplied document ID as deleted.
+
+
+doc_id - A document id.
+
+
+optimize
+
+$indexer-optimize();
+
+Optimize the index for search-time performance.
+This may take a while,
+as it can involve rewriting large amounts of data.
+
+Every Indexer session which changes index content and ends in a commit() creates a new segment.
+Once written,
+segments are never modified.
+However,
+they are periodically recycled by feeding their content into the segment 
currently being written.
+
+The optimize() method causes all existing index content to be fed back into 
the Indexer.
+When commit() completes after an optimize(),
+the index will consist of one segment.
+So optimize() must be called before commit().
+Also,
+optimizing a fresh index created from scratch has no effect.
+
+Historically,
+there was a significant search-time performance benefit to collapsing down to 
a single segment versus even two segments.
+Now the effect of collapsing is much less significant,
+and calling optimize() 

svn commit: r1737642 [3/7] - in /lucy/site/trunk/content/docs: 0.4.0/ 0.4.0/perl/ 0.4.0/perl/Lucy/ 0.4.0/perl/Lucy/Analysis/ 0.4.0/perl/Lucy/Docs/ 0.4.0/perl/Lucy/Docs/Cookbook/ 0.4.0/perl/Lucy/Docs/T

2016-04-04 Thread nwellnhof
Added: lucy/site/trunk/content/docs/perl/Lucy.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/perl/Lucy.mdtext?rev=1737642=auto
==
--- lucy/site/trunk/content/docs/perl/Lucy.mdtext (added)
+++ lucy/site/trunk/content/docs/perl/Lucy.mdtext Mon Apr  4 09:22:30 2016
@@ -0,0 +1,243 @@
+Title: Lucy – Apache Lucy Documentation
+
+
+
+
+NAME
+
+Lucy - Apache Lucy search engine library.
+
+VERSION
+
+0.5.0
+
+SYNOPSIS
+
+First,
+plan out your index structure,
+create the index,
+and add documents:
+
+# indexer.pl
+
+use Lucy::Index::Indexer;
+use Lucy::Plan::Schema;
+use Lucy::Analysis::EasyAnalyzer;
+use Lucy::Plan::FullTextType;
+
+# Create a Schema which defines index fields.
+my $schema = Lucy::Plan::Schema-new;
+my $easyanalyzer = Lucy::Analysis::EasyAnalyzer-new(
+language = en,
+);
+my $type = Lucy::Plan::FullTextType-new(
+analyzer = $easyanalyzer,
+);
+$schema-spec_field( name = title,   type = $type );
+$schema-spec_field( name = content, type = $type );
+
+# Create the index and add documents.
+my $indexer = Lucy::Index::Indexer-new(
+schema = $schema,   
+index  = /path/to/index,
+create = 1,
+);
+while ( my ( $title, $content ) = each %source_docs ) {
+$indexer-add_doc({
+title   = $title,
+content = $content,
+});
+}
+$indexer-commit;
+
+Then,
+search the index:
+
+# search.pl
+
+use Lucy::Search::IndexSearcher;
+
+my $searcher = Lucy::Search::IndexSearcher-new( 
+index = /path/to/index 
+);
+my $hits = $searcher-hits( query = foo bar );
+while ( my $hit = $hits-next ) {
+print $hit-{title}\n;
+}
+
+DESCRIPTION
+
+The Apache Lucy search engine library delivers high-performance,
+modular full-text search.
+
+Features
+
+
+Extremely fast.
+A single machine can handle millions of documents.
+
+Scalable to multiple machines.
+
+Incremental indexing (addition/deletion of documents to/from an existing 
index).
+
+Configurable near-real-time index updates.
+
+Unicode support.
+
+Support for boolean operators AND,
+OR,
+and AND NOT; parenthetical groupings; prepended +plus and -minus.
+
+Algorithmic selection of relevant excerpts and highlighting of search 
terms within excerpts.
+
+Highly customizable query and indexing APIs.
+
+Customizable sorting.
+
+Phrase matching.
+
+Stemming.
+
+Stoplists.
+
+
+Getting Started
+
+Lucy::Simple provides a stripped down API which may suffice for many 
tasks.
+
+Lucy::Docs::Tutorial demonstrates how to build a basic CGI search 
application.
+
+The tutorial spends most of its time on these five classes:
+
+
+Lucy::Plan::Schema - Plan out your index.
+
+Lucy::Plan::FieldType - Define index fields.
+
+Lucy::Index::Indexer - Manipulate index content.
+
+Lucy::Search::IndexSearcher - Search an index.
+
+Lucy::Analysis::EasyAnalyzer - A one-size-fits-all parser/tokenizer.
+
+
+Delving Deeper
+
+Lucy::Docs::Cookbook augments the tutorial with more advanced recipes.
+
+For creating complex queries,
+see Lucy::Search::Query and its subclasses TermQuery,
+PhraseQuery,
+ANDQuery,
+ORQuery,
+NOTQuery,
+RequiredOptionalQuery,
+MatchAllQuery,
+and NoMatchQuery,
+plus Lucy::Search::QueryParser.
+
+For distributed searching,
+see LucyX::Remote::SearchServer,
+LucyX::Remote::SearchClient,
+and LucyX::Remote::ClusterSearcher.
+
+Backwards Compatibility Policy
+
+Lucy will spin off stable forks into new namespaces periodically.
+The first will be named Lucy1.
+Users who require strong backwards compatibility should use a stable fork.
+
+The main namespace,
+Lucy,
+is an API-unstable development branch (as hinted at by its 0.x.x version 
number).
+Superficial interface changes happen frequently.
+Hard file format compatibility breaks which require reindexing are rare,
+as we generally try to provide continuity across multiple releases,
+but we reserve the right to make such changes.
+
+CLASS METHODS
+
+The Lucy module itself does not have a large interface,
+providing only a single public class method.
+
+error
+
+my $instream = $folder-open_in( file = foo ) or die 
Clownfish-error;
+
+Access a shared variable which is set by some routines on failure.
+It will always be either a Clownfish::Err object or undef.
+
+SUPPORT
+
+The Apache Lucy homepage,
+where youll find links to our mailing lists and so on,
+is http://lucy.apache.org; class="podlinkurl"
+>http://lucy.apache.org.
+Please direct support questions to the Lucy users mailing list.
+
+BUGS
+
+Not thread-safe.
+
+Some exceptions leak memory.
+
+If you find a bug,
+please inquire on the Lucy users mailing list about it,
+then report it on the Lucy issue tracker once it has been confirmed: https://issues.apache.org/jira/browse/LUCY; class="podlinkurl"
+>https://issues.apache.org/jira/browse/LUCY.
+
+COPYRIGHT
+
+Apache Lucy is distributed under the Apache License,
+Version 2.0,
+as described in the file LICENSE included with the 
distribution.
+
+

Added: 

svn commit: r1737642 [1/7] - in /lucy/site/trunk/content/docs: 0.4.0/ 0.4.0/perl/ 0.4.0/perl/Lucy/ 0.4.0/perl/Lucy/Analysis/ 0.4.0/perl/Lucy/Docs/ 0.4.0/perl/Lucy/Docs/Cookbook/ 0.4.0/perl/Lucy/Docs/T

2016-04-04 Thread nwellnhof
Author: nwellnhof
Date: Mon Apr  4 09:22:30 2016
New Revision: 1737642

URL: http://svn.apache.org/viewvc?rev=1737642=rev
Log:
Update Perl documentation to 0.5.0

Added:
lucy/site/trunk/content/docs/0.4.0/
lucy/site/trunk/content/docs/0.4.0/perl/
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/
lucy/site/trunk/content/docs/0.4.0/perl/Lucy.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Analysis/
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Analysis/Analyzer.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Analysis/Analyzer.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Analysis/CaseFolder.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Analysis/CaseFolder.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Analysis/EasyAnalyzer.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Analysis/EasyAnalyzer.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Analysis/Normalizer.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Analysis/Normalizer.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Analysis/PolyAnalyzer.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Analysis/PolyAnalyzer.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Analysis/RegexTokenizer.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Analysis/RegexTokenizer.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Analysis/SnowballStemmer.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Analysis/SnowballStemmer.html

lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Analysis/SnowballStopFilter.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Analysis/SnowballStopFilter.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Analysis/StandardTokenizer.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Analysis/StandardTokenizer.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/Cookbook/
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/Cookbook.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Docs/Cookbook.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/Cookbook/CustomQuery.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Docs/Cookbook/CustomQuery.html

lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/Cookbook/CustomQueryParser.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Docs/Cookbook/CustomQueryParser.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/Cookbook/FastUpdates.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Docs/Cookbook/FastUpdates.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/DevGuide.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Docs/DevGuide.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/DocIDs.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Docs/DocIDs.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/FileFormat.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Docs/FileFormat.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/FileLocking.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Docs/FileLocking.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/IRTheory.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Docs/IRTheory.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/Tutorial/
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/Tutorial.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Docs/Tutorial.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/Tutorial/Analysis.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Docs/Tutorial/Analysis.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/Tutorial/BeyondSimple.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Docs/Tutorial/BeyondSimple.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/Tutorial/FieldType.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Docs/Tutorial/FieldType.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/Tutorial/Highlighter.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl/Lucy/Docs/Tutorial/Highlighter.html
lucy/site/trunk/content/docs/0.4.0/perl/Lucy/Docs/Tutorial/QueryObjects.html
  - copied, changed from r1732649, 
lucy/site/trunk/content/docs/perl

svn commit: r1737642 [6/7] - in /lucy/site/trunk/content/docs: 0.4.0/ 0.4.0/perl/ 0.4.0/perl/Lucy/ 0.4.0/perl/Lucy/Analysis/ 0.4.0/perl/Lucy/Docs/ 0.4.0/perl/Lucy/Docs/Cookbook/ 0.4.0/perl/Lucy/Docs/T

2016-04-04 Thread nwellnhof
Added: lucy/site/trunk/content/docs/perl/Lucy/Search/LeafQuery.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/perl/Lucy/Search/LeafQuery.mdtext?rev=1737642=auto
==
--- lucy/site/trunk/content/docs/perl/Lucy/Search/LeafQuery.mdtext (added)
+++ lucy/site/trunk/content/docs/perl/Lucy/Search/LeafQuery.mdtext Mon Apr  4 
09:22:30 2016
@@ -0,0 +1,106 @@
+Title: Lucy::Search::LeafQuery – Apache Lucy Documentation
+
+
+
+
+NAME
+
+Lucy::Search::LeafQuery - Leaf node in a tree created by QueryParser.
+
+SYNOPSIS
+
+package MyQueryParser;
+use base qw( Lucy::Search::QueryParser );
+
+sub expand_leaf {
+my ( $self, $leaf_query ) = @_;
+if ( $leaf_query-get_text =~ /.\*\s*$/ ) {
+return PrefixQuery-new(
+query_string = $leaf_query-get_text,
+field= $leaf_query-get_field,
+);
+}
+else {
+return $self-SUPER::expand_leaf($leaf_query);
+}
+}
+
+DESCRIPTION
+
+LeafQuery objects serve as leaf nodes in the tree structure generated by QueryParsers tree() method.
+Ultimately,
+they must be transformed,
+typically into either TermQuery or PhraseQuery objects,
+as attempting to search a LeafQuery causes an error.
+
+CONSTRUCTORS
+
+new
+
+my $leaf_query = Lucy::Search::LeafQuery-new(
+text  = three blind mice,# required
+field = content,   # default: undef
+);
+
+Create a new LeafQuery.
+
+
+field - Optional field name.
+
+text - Raw query text.
+
+
+METHODS
+
+get_field
+
+my $string = $leaf_query-get_field();
+
+Accessor for objects field attribute.
+
+get_text
+
+my $string = $leaf_query-get_text();
+
+Accessor for objects text attribute.
+
+make_compiler
+
+my $compiler = $leaf_query-make_compiler(
+searcher= $searcher # required
+boost   = $boost# required
+subordinate = $subordinate  # default: false
+);
+
+Throws an error.
+
+INHERITANCE
+
+Lucy::Search::LeafQuery isa Lucy::Search::Query isa Clownfish::Obj.
+
+

Added: lucy/site/trunk/content/docs/perl/Lucy/Search/MatchAllQuery.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/perl/Lucy/Search/MatchAllQuery.mdtext?rev=1737642=auto
==
--- lucy/site/trunk/content/docs/perl/Lucy/Search/MatchAllQuery.mdtext (added)
+++ lucy/site/trunk/content/docs/perl/Lucy/Search/MatchAllQuery.mdtext Mon Apr  
4 09:22:30 2016
@@ -0,0 +1,68 @@
+Title: Lucy::Search::MatchAllQuery – Apache Lucy Documentation
+
+
+
+
+NAME
+
+Lucy::Search::MatchAllQuery - Query which matches all documents.
+
+DESCRIPTION
+
+MatchAllQuery is a utility class which matches all documents.
+Each match is assigned a score of 0.0,
+so that in composite queries,
+any document which matches against another part of the query will be ranked 
higher than a document which matches only via the MatchAllQuery.
+
+CONSTRUCTORS
+
+new
+
+my $match_all_query = Lucy::Search::MatchAllQuery-new;
+
+Constructor.
+Takes no arguments.
+
+METHODS
+
+make_compiler
+
+my $compiler = $match_all_query-make_compiler(
+searcher= $searcher # required
+boost   = $boost# required
+subordinate = $subordinate  # default: false
+);
+
+Abstract factory method returning a Compiler derived from this Query.
+
+
+searcher - A Searcher.
+
+boost - A scoring multiplier.
+
+subordinate - Indicates whether the Query is a subquery (as opposed 
to a top-level query).
+If false,
+the implementation must invoke normalize() on the newly minted Compiler object before returning it.
+
+
+INHERITANCE
+
+Lucy::Search::MatchAllQuery isa Lucy::Search::Query isa Clownfish::Obj.
+
+

Added: lucy/site/trunk/content/docs/perl/Lucy/Search/Matcher.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/perl/Lucy/Search/Matcher.mdtext?rev=1737642=auto
==
--- lucy/site/trunk/content/docs/perl/Lucy/Search/Matcher.mdtext (added)
+++ lucy/site/trunk/content/docs/perl/Lucy/Search/Matcher.mdtext Mon Apr  4 
09:22:30 2016
@@ -0,0 +1,105 @@
+Title: Lucy::Search::Matcher – Apache Lucy Documentation
+
+
+
+
+NAME
+
+Lucy::Search::Matcher - Match a set of document ids.
+
+SYNOPSIS
+
+# abstract base class
+
+DESCRIPTION
+
+A Matcher iterates over a set of ascending document ids.
+Some Matchers implement score() and can assign relevance scores to the docs that they match.
+Other implementations may be match-only.
+
+CONSTRUCTORS
+
+new
+
+my $matcher = MyMatcher-SUPER::new;
+
+Abstract constructor.
+
+ABSTRACT METHODS
+
+next
+
+my $int = $matcher-next();
+
+Proceed to the next doc id.
+
+Returns: A positive doc id,
+or 0 once the iterator is exhausted.
+
+get_doc_id
+
+my $int = $matcher-get_doc_id();
+
+Return the current doc id.
+Valid only after a successful call to next() or advance() and must not be called otherwise.
+
+score
+
+my 

svn commit: r1737642 [2/7] - in /lucy/site/trunk/content/docs: 0.4.0/ 0.4.0/perl/ 0.4.0/perl/Lucy/ 0.4.0/perl/Lucy/Analysis/ 0.4.0/perl/Lucy/Docs/ 0.4.0/perl/Lucy/Docs/Cookbook/ 0.4.0/perl/Lucy/Docs/T

2016-04-04 Thread nwellnhof
Added: lucy/site/trunk/content/docs/perl/Clownfish.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/perl/Clownfish.mdtext?rev=1737642=auto
==
--- lucy/site/trunk/content/docs/perl/Clownfish.mdtext (added)
+++ lucy/site/trunk/content/docs/perl/Clownfish.mdtext Mon Apr  4 09:22:30 2016
@@ -0,0 +1,137 @@
+Title: Clownfish – Apache Clownfish Documentation
+
+
+
+
+NAME
+
+Clownfish - Apache Clownfish symbiotic object system
+
+DESCRIPTION
+
+The Apache Clownfish symbiotic object system pairs with 
host programming language environments and facilitates the 
development of high performance language extensions.
+
+Features
+
+
+Support for multiple host languages.
+
+Support for stand-alone C libraries and executables.
+
+Subclassing and method overriding from the host language.
+
+Support for host language idioms like named parameters or default argument 
values.
+
+Highly performant object system with lazy creation of host language 
objects.
+
+Runtime with classes for commonly used data structures like strings,
+dynamic arrays and hash tables.
+
+Guaranteed ABI stability when adding or reordering methods or instance 
variables.
+
+Modularity.
+
+Introspection.
+
+Documentation generator.
+
+
+Planned features
+
+
+Support for more host languages.
+
+Support for interfaces.
+
+
+Overview
+
+Clownfish consists of two parts,
+the Clownfish compiler CFC and the Clownfish runtime.
+CFC is a code generator that creates C header files,
+host language bindings,
+initialization code and documentation from a set of Clownfish header files.
+The generated code is compiled with other project code and linked with the 
Clownfish runtime.
+
+Clownfish header files have a .cfh extension and define 
classes used within the Clownfish object system.
+The object system is implemented in C and supports single inheritance and 
virtual method dispatch.
+CFC creates a C header file from each Clownfish header containing the C 
interface to Clownfish objects.
+Functions and methods of objects are implemented in normal C source files.
+Beyond the C level,
+CFC can generate host language bindings to make Clownfish objects accessible 
from other programming languages.
+The compiler also creates class documentation in various formats from comments 
contained in Clownfish header files and standalone Markdown files.
+
+The Clownfish runtime provides:
+
+
+The Obj class which is the root of the class hierarchy.
+
+Core data types like strings,
+dynamic arrays,
+and hashes.
+
+The Class metaclass.
+
+Some helper classes.
+
+
+Host language support
+
+Bindings for the following hosts are under development:
+
+
+C (feature-complete)
+
+Go (experimental)
+
+Perl 5 (feature-complete)
+
+Python 3 / CPython (nascent)
+
+Ruby / MRI (nascent)
+
+
+Help wanted
+
+The target audience for the current release of Clownfish is developers.
+Clownfish is developed by the Apache Lucy community,
+where it is used to provide host language bindings for the Lucy search engine 
library; we expect that as Clownfish matures it will eventually spin off as an 
independent project.
+If you would like to contribute to Clownfish,
+please join the http://lucy.apache.org/mailing_lists; 
class="podlinkurl"
+>Lucy developers mailing list.
+
+Documentation
+
+
+Working with Clownfish classes
+
+Building Clownfish projects in C environments
+
+Writing Clownfish classes
+
+
+

Added: lucy/site/trunk/content/docs/perl/Clownfish/Blob.mdtext
URL: 
http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/perl/Clownfish/Blob.mdtext?rev=1737642=auto
==
--- lucy/site/trunk/content/docs/perl/Clownfish/Blob.mdtext (added)
+++ lucy/site/trunk/content/docs/perl/Clownfish/Blob.mdtext Mon Apr  4 09:22:30 
2016
@@ -0,0 +1,78 @@
+Title: Clownfish::Blob – Apache Clownfish Documentation
+
+
+
+
+NAME
+
+Clownfish::Blob - Immutable buffer holding arbitrary bytes.
+
+SYNOPSIS
+
+my $blob = Clownfish::Blob-new($byte_string);
+my $byte_string = $blob-to_perl;
+
+DESCRIPTION
+
+CONSTRUCTORS
+
+new
+
+my $blob = Clownfish::Blob-new($byte_string);
+
+Create a Blob containing the passed-in bytes.
+
+METHODS
+
+get_size
+
+my $int = $blob-get_size();
+
+Return the number of bytes held by the Blob.
+
+compare_to
+
+my $int = $blob-compare_to($other);
+
+Indicate whether one Blob is less than,
+equal to,
+or greater than another.
+The byte contents of the Blobs are compared lexicographically.
+Throws an exception if other is not a Blob.
+
+Returns: 0 if the Blobs are equal,
+a negative number if self is less than other,
+and a positive number if self is greater than 
other.
+
+clone
+
+my $result = $blob-clone();
+
+Return a clone of the object.
+
+INHERITANCE
+
+Clownfish::Blob isa Clownfish::Obj.
+
+

Added: lucy/site/trunk/content/docs/perl/Clownfish/Boolean.mdtext
URL: 

svn commit: r12976 - /dev/lucy/clownfish/apache-clownfish-0.5.0-rc2/

2016-04-02 Thread nwellnhof
Author: nwellnhof
Date: Sat Apr  2 13:11:38 2016
New Revision: 12976

Log:
Remove apache-clownfish-0.5.0-rc2

Removed:
dev/lucy/clownfish/apache-clownfish-0.5.0-rc2/



svn commit: r12975 - /dev/lucy/apache-lucy-0.5.0-rc3/ /release/lucy/CHANGES-0.5.0.txt /release/lucy/apache-lucy-0.5.0.tar.gz /release/lucy/apache-lucy-0.5.0.tar.gz.asc /release/lucy/apache-lucy-0.5.0.

2016-04-02 Thread nwellnhof
Author: nwellnhof
Date: Sat Apr  2 13:08:58 2016
New Revision: 12975

Log:
Publish Apache Lucy 0.5.0

Added:
release/lucy/CHANGES-0.5.0.txt
  - copied unchanged from r12974, 
dev/lucy/apache-lucy-0.5.0-rc3/CHANGES-0.5.0.txt
release/lucy/apache-lucy-0.5.0.tar.gz
  - copied unchanged from r12974, 
dev/lucy/apache-lucy-0.5.0-rc3/apache-lucy-0.5.0.tar.gz
release/lucy/apache-lucy-0.5.0.tar.gz.asc
  - copied unchanged from r12974, 
dev/lucy/apache-lucy-0.5.0-rc3/apache-lucy-0.5.0.tar.gz.asc
release/lucy/apache-lucy-0.5.0.tar.gz.md5
  - copied unchanged from r12974, 
dev/lucy/apache-lucy-0.5.0-rc3/apache-lucy-0.5.0.tar.gz.md5
release/lucy/apache-lucy-0.5.0.tar.gz.sha
  - copied unchanged from r12974, 
dev/lucy/apache-lucy-0.5.0-rc3/apache-lucy-0.5.0.tar.gz.sha
Removed:
dev/lucy/apache-lucy-0.5.0-rc3/



[lucy] Git Push Summary

2016-04-02 Thread nwellnhof
Repository: lucy
Updated Tags:  refs/tags/apache-lucy-0.5.0-rc3 [deleted] 3a814fdff


[lucy] Git Push Summary

2016-04-02 Thread nwellnhof
Repository: lucy
Updated Tags:  refs/tags/apache-lucy-0.5.0-rc1 [deleted] 96feeda28


[lucy] Git Push Summary

2016-04-02 Thread nwellnhof
Repository: lucy
Updated Tags:  refs/tags/apache-lucy-0.5.0-rc2 [deleted] 46c0c0ffa


[lucy] Git Push Summary

2016-04-02 Thread nwellnhof
Repository: lucy
Updated Tags:  refs/tags/apache-lucy-0.5.0 [created] 3a814fdff


svn commit: r12974 - /dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/ /release/lucy/clownfish/

2016-04-02 Thread nwellnhof
Author: nwellnhof
Date: Sat Apr  2 13:02:12 2016
New Revision: 12974

Log:
Publish Apache Clownfish 0.5.0

Added:
release/lucy/clownfish/CHANGES-0.5.0.txt
  - copied unchanged from r12973, 
dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/CHANGES-0.5.0.txt
release/lucy/clownfish/apache-clownfish-0.5.0.tar.gz
  - copied unchanged from r12973, 
dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/apache-clownfish-0.5.0.tar.gz
release/lucy/clownfish/apache-clownfish-0.5.0.tar.gz.asc
  - copied unchanged from r12973, 
dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/apache-clownfish-0.5.0.tar.gz.asc
release/lucy/clownfish/apache-clownfish-0.5.0.tar.gz.md5
  - copied unchanged from r12973, 
dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/apache-clownfish-0.5.0.tar.gz.md5
release/lucy/clownfish/apache-clownfish-0.5.0.tar.gz.sha
  - copied unchanged from r12973, 
dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/apache-clownfish-0.5.0.tar.gz.sha
Removed:
dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/



[lucy-clownfish] Git Push Summary

2016-04-02 Thread nwellnhof
Repository: lucy-clownfish
Updated Tags:  refs/tags/apache-clownfish-0.5.0-rc2 [deleted] 0bdb09a79


[lucy-clownfish] Git Push Summary

2016-04-02 Thread nwellnhof
Repository: lucy-clownfish
Updated Tags:  refs/tags/apache-clownfish-0.5.0-rc3 [deleted] b3b1db740


[lucy-clownfish] Git Push Summary

2016-04-02 Thread nwellnhof
Repository: lucy-clownfish
Updated Tags:  refs/tags/apache-clownfish-0.5.0-rc1 [deleted] ce2fc5310


[lucy-clownfish] Git Push Summary

2016-04-02 Thread nwellnhof
Repository: lucy-clownfish
Updated Tags:  refs/tags/apache-clownfish-0.5.0 [created] b3b1db740


[1/2] lucy git commit: Fix wrong vararg type in LFLock_init

2016-03-25 Thread nwellnhof
Repository: lucy
Updated Branches:
  refs/heads/master 94c6aa2ea -> 8193b73ef


Fix wrong vararg type in LFLock_init

This only results in random junk in a tempfile name, so probably
harmless.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/2748bb85
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/2748bb85
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/2748bb85

Branch: refs/heads/master
Commit: 2748bb85e41f8431f77667eb70aeef83b0712f55
Parents: 94c6aa2
Author: Nick Wellnhofer 
Authored: Fri Mar 25 11:25:09 2016 +0100
Committer: Nick Wellnhofer 
Committed: Fri Mar 25 11:31:05 2016 +0100

--
 core/Lucy/Store/Lock.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/2748bb85/core/Lucy/Store/Lock.c
--
diff --git a/core/Lucy/Store/Lock.c b/core/Lucy/Store/Lock.c
index 40b9704..20bffe2 100644
--- a/core/Lucy/Store/Lock.c
+++ b/core/Lucy/Store/Lock.c
@@ -124,7 +124,8 @@ LFLock_init(LockFileLock *self, Folder *folder, String 
*name,
 int pid = PID_getpid();
 Lock_init((Lock*)self, folder, name, host, timeout, interval);
 LockFileLockIVARS *const ivars = LFLock_IVARS(self);
-ivars->link_path = Str_newf("%o.%o.%i64", ivars->lock_path, host, pid);
+ivars->link_path = Str_newf("%o.%o.%i64", ivars->lock_path, host,
+(int64_t)pid);
 return self;
 }
 



[2/2] lucy git commit: Fix %i64/%u64 mismatches

2016-03-25 Thread nwellnhof
Fix %i64/%u64 mismatches


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/8193b73e
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/8193b73e
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/8193b73e

Branch: refs/heads/master
Commit: 8193b73efedf0222e99f26b62ee21e18498af6aa
Parents: 2748bb8
Author: Nick Wellnhofer 
Authored: Fri Mar 25 11:31:10 2016 +0100
Committer: Nick Wellnhofer 
Committed: Fri Mar 25 11:31:10 2016 +0100

--
 core/Lucy/Store/InStream.c  | 2 +-
 core/Lucy/Store/RAMFileHandle.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/8193b73e/core/Lucy/Store/InStream.c
--
diff --git a/core/Lucy/Store/InStream.c b/core/Lucy/Store/InStream.c
index b4e1e53..a6d61d8 100644
--- a/core/Lucy/Store/InStream.c
+++ b/core/Lucy/Store/InStream.c
@@ -203,7 +203,7 @@ S_fill(InStream *self, int64_t amount) {
 
 // Throw an error if the requested amount would take us beyond EOF.
 if (amount > remaining) {
-THROW(ERR,  "Read past EOF of %o (pos: %u64 len: %u64 request: %u64)",
+THROW(ERR,  "Read past EOF of %o (pos: %i64 len: %i64 request: %i64)",
   ivars->filename, virtual_file_pos, ivars->len, amount);
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/8193b73e/core/Lucy/Store/RAMFileHandle.c
--
diff --git a/core/Lucy/Store/RAMFileHandle.c b/core/Lucy/Store/RAMFileHandle.c
index 8db9f60..7895d25 100644
--- a/core/Lucy/Store/RAMFileHandle.c
+++ b/core/Lucy/Store/RAMFileHandle.c
@@ -124,7 +124,7 @@ RAMFH_Read_IMP(RAMFileHandle *self, char *dest, int64_t 
offset, size_t len) {
 return false;
 }
 else if (end > ivars->len) {
-Err_set_error(Err_new(Str_newf("Attempt to read %u64 bytes starting at 
%i64 goes past EOF %u64",
+Err_set_error(Err_new(Str_newf("Attempt to read %u64 bytes starting at 
%i64 goes past EOF %i64",
(uint64_t)len, offset, ivars->len)));
 return false;
 }



svn commit: r12862 - in /dev/lucy/clownfish/apache-clownfish-0.5.0-rc3: CHANGES-0.5.0.txt apache-clownfish-0.5.0.tar.gz apache-clownfish-0.5.0.tar.gz.asc apache-clownfish-0.5.0.tar.gz.md5 apache-clown

2016-03-25 Thread nwellnhof
Author: nwellnhof
Date: Fri Mar 25 09:05:41 2016
New Revision: 12862

Log:
Add apache-clownfish-0.5.0 artifacts

Added:
dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/CHANGES-0.5.0.txt
dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/apache-clownfish-0.5.0.tar.gz 
  (with props)

dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/apache-clownfish-0.5.0.tar.gz.asc

dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/apache-clownfish-0.5.0.tar.gz.md5

dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/apache-clownfish-0.5.0.tar.gz.sha

Added: dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/CHANGES-0.5.0.txt
==
--- dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/CHANGES-0.5.0.txt (added)
+++ dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/CHANGES-0.5.0.txt Fri Mar 25 
09:05:41 2016
@@ -0,0 +1,102 @@
+Revision history for Apache Clownfish
+
+0.5.0  2016-03-04
+
+  New features:
+
+* [CLOWNFISH-2] - Create iterator for Hash
+* [CLOWNFISH-19] - Go (golang) bindings for CFC
+* [CLOWNFISH-23] - Markdown for documentation
+* [CLOWNFISH-26] - Markdown for standalone documentation files
+* [CLOWNFISH-28] - Proof-of-concept Go bindings
+* [CLOWNFISH-46] - Travis CI with multiple host languages
+* [CLOWNFISH-64] - Autogenerate subroutine code samples in Perl POD
+* [CLOWNFISH-66] - Python-specific CFC
+* [CLOWNFISH-71] - Autogenerate HTML documentation for C API
+* [CLOWNFISH-72] - Document Clownfish internals like header file language
+* [CLOWNFISH-75] - Add Clownfish page to lucy.apache.org
+
+  Bugfixes:
+
+* [CLOWNFISH-3] - Charmonizer bombs out trying to set warnings as errors
+  with Strawberry Perl
+* [CLOWNFISH-9] - Make most Clownfish core types final
+* [CLOWNFISH-24] - Error handling in C bindings is not thread-safe
+* [CLOWNFISH-33] - Duplicate hash entries
+* [CLOWNFISH-37] - Order of refcount manipulation when overwriting
+* [CLOWNFISH-45] - Dynamically subclassing a final class should fail
+* [CLOWNFISH-47] - Tighten up final method code gen and optimization
+* [CLOWNFISH-62] - Crash when passing Perl variable as decremented arg
+* [CLOWNFISH-63] - Don't export private methods via Go
+* [CLOWNFISH-69] - Clownfish::CFC missing from CPAN prereqs
+* [CLOWNFISH-84] - Guarantee nul-terminated arg to strtod in Str_To_F64
+
+  Improvements:
+
+* [CLOWNFISH-7] - String-only keys for Hash
+* [CLOWNFISH-11] - Rework ByteBuf
+* [CLOWNFISH-15] - Method OFFSET vars should be uint32_t instead of
+   size_t
+* [CLOWNFISH-27] - Use functions rather than methods for refcounting
+* [CLOWNFISH-29] - Use PERL_NO_GET_CONTEXT
+* [CLOWNFISH-30] - Eliminate autogenerated "callbacks.h"
+* [CLOWNFISH-34] - String-only keys for LFReg
+* [CLOWNFISH-35] - Use size_t for Array and Hash indices
+* [CLOWNFISH-39] - Public Vector API
+* [CLOWNFISH-40] - LockFreeRegistry should be private
+* [CLOWNFISH-42] - Move NumberUtils to Lucy
+* [CLOWNFISH-49] - Remove Obj_Mimic, Obj_To_[FI]64, Obj_To_Bool
+* [CLOWNFISH-50] - Convert some Obj methods to inert functions
+* [CLOWNFISH-51] - Go glue should convert clownfish.String to Go string
+* [CLOWNFISH-52] - Implement To_Host methods for core types
+* [CLOWNFISH-53] - Support MSVC in C mode
+* [CLOWNFISH-56] - Map Clownfish composite types to Go host types
+* [CLOWNFISH-57] - Map clownfish.Obj to Go empty interface
+* [CLOWNFISH-58] - Refine Hash API
+* [CLOWNFISH-59] - Refine Go bindings
+* [CLOWNFISH-61] - Run core tests under Go bindings
+* [CLOWNFISH-65] - Refresh intro docs
+* [CLOWNFISH-70] - Export major version from Perl bindings
+* [CLOWNFISH-79] - Improve generated Perl bindings
+
+0.4.4 2016-01-26
+
+  Bugfixes:
+
+* [CLOWNFISH-3] - Charmonizer bombs out trying to set warnings as
+  errors with Strawberry Perl
+* [CLOWNFISH-69] - Clownfish::CFC missing from CPAN prereqs
+
+0.4.3 2016-01-09
+
+  Bugfixes:
+
+* [CLOWNFISH-33] - Duplicate hash entries
+
+  Improvements:
+
+* Fix build and test suite under Strawberry Perl.
+* Improve installation scripts for C library.
+
+0.4.2 2014-12-16
+
+  Bugfixes:
+
+* [CLOWNFISH-18] - Determine Clownfish include dirs at build time
+
+0.4.1 2014-09-25
+
+  Bugfixes:
+
+* [CLOWNFISH-4] - Account for compiler names with invalid leading
+  whitespace
+* [CLOWNFISH-5] - Add stub Clownfish/CFC/Model/Version.pm
+* [CLOWNFISH-6] - Update issue tracker in dist metadata
+* [CLOWNFISH-8] - CPAN smokers fail to build Lucy
+* [CLOWNFISH-16] - Support arguments in $Config{cc}
+* [CLOWNFISH-17] - Bump Devel::PPPort dependency to version 3.14
+
+0.4.0  2014-08-19
+
+  Initial independent release after separation from Apache Lucy.
+

Added: 
dev/lucy/clownfish/apache-clownfish

[lucy-clownfish] Git Push Summary

2016-03-25 Thread nwellnhof
Repository: lucy-clownfish
Updated Tags:  refs/tags/apache-clownfish-0.5.0-rc3 [created] b3b1db740


svn commit: r12861 - /dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/

2016-03-25 Thread nwellnhof
Author: nwellnhof
Date: Fri Mar 25 09:04:55 2016
New Revision: 12861

Log:
Create RC dir for apache-clownfish-0.5.0-rc3

Added:
dev/lucy/clownfish/apache-clownfish-0.5.0-rc3/



[2/2] lucy-clownfish git commit: Ensure nul-terminated arg to strtod.

2016-03-25 Thread nwellnhof
Ensure nul-terminated arg to strtod.

Inside Str_To_F64 we use strtod, which requires a nul-terminated C
string argument.  Now that Clownfish Strings consistently lack
nul-termination, we need to copy content into a nul-terminated buffer
and pass that to strtod.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/788087e7
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/788087e7
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/788087e7

Branch: refs/heads/0.5
Commit: 788087e7e6a544bdba1e42b5bd30f2761071afed
Parents: 7ecc951
Author: Marvin Humphrey 
Authored: Mon Mar 14 16:05:23 2016 -0700
Committer: Nick Wellnhofer 
Committed: Fri Mar 25 10:01:38 2016 +0100

--
 CHANGES |  1 +
 runtime/core/Clownfish/String.c | 15 ++-
 2 files changed, 3 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/788087e7/CHANGES
--
diff --git a/CHANGES b/CHANGES
index d295a0b..ffa2e67 100644
--- a/CHANGES
+++ b/CHANGES
@@ -29,6 +29,7 @@ Revision history for Apache Clownfish
 * [CLOWNFISH-62] - Crash when passing Perl variable as decremented arg
 * [CLOWNFISH-63] - Don't export private methods via Go
 * [CLOWNFISH-69] - Clownfish::CFC missing from CPAN prereqs
+* [CLOWNFISH-84] - Guarantee nul-terminated arg to strtod in Str_To_F64
 
   Improvements:
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/788087e7/runtime/core/Clownfish/String.c
--
diff --git a/runtime/core/Clownfish/String.c b/runtime/core/Clownfish/String.c
index 7c2c0fa..ac17bad 100644
--- a/runtime/core/Clownfish/String.c
+++ b/runtime/core/Clownfish/String.c
@@ -263,8 +263,8 @@ Str_BaseX_To_I64_IMP(String *self, uint32_t base) {
 return retval;
 }
 
-static double
-S_safe_to_f64(String *self) {
+double
+Str_To_F64_IMP(String *self) {
 size_t amount = self->size < 511 ? self->size : 511;
 char buf[512];
 memcpy(buf, self->ptr, amount);
@@ -272,17 +272,6 @@ S_safe_to_f64(String *self) {
 return strtod(buf, NULL);
 }
 
-double
-Str_To_F64_IMP(String *self) {
-char   *end;
-double  value= strtod(self->ptr, );
-size_t  consumed = end - self->ptr;
-if (consumed > self->size) { // strtod overran
-value = S_safe_to_f64(self);
-}
-return value;
-}
-
 char*
 Str_To_Utf8_IMP(String *self) {
 char *buf = (char*)malloc(self->size + 1);



[1/2] lucy-clownfish git commit: Fix some `unused` warnings in the Perl bindings.

2016-03-25 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/0.5 33651d757 -> 788087e7e


Fix some `unused` warnings in the Perl bindings.

Have the code generator emit some temp variables only if they are
needed.  Deploy one UNUSED_VAR macro.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/7ecc951e
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/7ecc951e
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/7ecc951e

Branch: refs/heads/0.5
Commit: 7ecc951e8575544ba070581f3754548d80b2d3df
Parents: 33651d7
Author: Marvin Humphrey 
Authored: Wed Mar 16 00:35:55 2016 +
Committer: Nick Wellnhofer 
Committed: Fri Mar 25 09:58:33 2016 +0100

--
 compiler/src/CFCPerlConstructor.c   |  4 ++--
 compiler/src/CFCPerlMethod.c| 23 +++-
 .../perl/buildlib/Clownfish/Build/Binding.pm|  1 +
 3 files changed, 20 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/7ecc951e/compiler/src/CFCPerlConstructor.c
--
diff --git a/compiler/src/CFCPerlConstructor.c 
b/compiler/src/CFCPerlConstructor.c
index c0c3a89..380cb08 100644
--- a/compiler/src/CFCPerlConstructor.c
+++ b/compiler/src/CFCPerlConstructor.c
@@ -118,7 +118,8 @@ CFCPerlConstructor_xsub_def(CFCPerlConstructor *self, 
CFCClass *klass) {
 unsigned num_params = num_vars - 1;
 items_check = "items < 1";
 param_specs = CFCPerlSub_build_param_specs((CFCPerlSub*)self, 1);
-locs_decl   = CFCUtil_sprintf("int32_t locations[%u];\n",
+locs_decl   = CFCUtil_sprintf("int32_t locations[%u];\n"
+  "SV *sv;\n",
   num_params);
 
 const char *pattern =
@@ -146,7 +147,6 @@ CFCPerlConstructor_xsub_def(CFCPerlConstructor *self, 
CFCClass *klass) {
 "dXSARGS;\n"
 "%s" // param_specs
 "%s" // locs_decl
-"SV *sv;\n"
 "%s" // arg_decls
 "%s retval;\n"
 "\n"

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/7ecc951e/compiler/src/CFCPerlMethod.c
--
diff --git a/compiler/src/CFCPerlMethod.c b/compiler/src/CFCPerlMethod.c
index 911d51d..9e36d77 100644
--- a/compiler/src/CFCPerlMethod.c
+++ b/compiler/src/CFCPerlMethod.c
@@ -258,13 +258,18 @@ S_xsub_def_labeled_params(CFCPerlMethod *self, CFCClass 
*klass) {
 retval_decl = CFCUtil_sprintf("%s retval;\n", return_type_c);
 }
 
+const char *locations_sv = "";
+if (num_vars > 1) {
+locations_sv = "SV *sv;\n";
+}
+
 char pattern[] =
 "XS(%s);\n"
 "XS(%s) {\n"
 "dXSARGS;\n"
 "%s"// param_specs
 "int32_t locations[%d];\n"
-"SV *sv;\n"
+"%s" // locations_sv
 "%s"// arg_decls
 "%s method;\n"
 "%s"
@@ -286,8 +291,9 @@ S_xsub_def_labeled_params(CFCPerlMethod *self, CFCClass 
*klass) {
 "}\n";
 char *xsub_def
 = CFCUtil_sprintf(pattern, c_name, c_name, param_specs, num_vars - 1,
-  arg_decls, meth_type_c, retval_decl, self_name,
-  num_vars - 1, self_assign, arg_assigns, body);
+  locations_sv, arg_decls, meth_type_c, retval_decl,
+  self_name, num_vars - 1, self_assign, arg_assigns,
+  body);
 
 FREEMEM(param_specs);
 FREEMEM(arg_decls);
@@ -342,6 +348,10 @@ S_xsub_def_positional_args(CFCPerlMethod *self, CFCClass 
*klass) {
NULL);
 }
 }
+const char *working_sv = "";
+if (num_vars > 1) {
+working_sv = "SV *sv;\n";
+}
 
 char *retval_decl;
 if (CFCType_is_void(return_type)) {
@@ -356,7 +366,7 @@ S_xsub_def_positional_args(CFCPerlMethod *self, CFCClass 
*klass) {
 "XS(%s);\n"
 "XS(%s) {\n"
 "dXSARGS;\n"
-"SV *sv;\n"
+"%s" // working_sv
 "%s" // arg_decls
 "%s method;\n"
 "%s"
@@ -376,8 +386,9 @@ S_xsub_def_positional_args(CFCPerlMethod *self, CFCClass 
*klass) {
 "}\n";
 char *xsub
 = CFCUtil_sprintf(pattern, self->sub.c_name, self->sub.c_name,
-  arg_decls, meth_type_c, retval_decl, num_args_cond,
-  xs_name_list, self_assign, arg_assigns, body);
+  working_sv, arg_decls, meth_type_c, retval_decl,
+  num_args_cond, xs_name_list, self_assign,
+ 

[lucy] Git Push Summary

2016-03-24 Thread nwellnhof
Repository: lucy
Updated Tags:  refs/tags/apache-lucy-0.4.2-rc1 [deleted] 9365acde1


[2/3] lucy git commit: Fix bug in Perl implementation of Doc_Equals

2016-03-24 Thread nwellnhof
Fix bug in Perl implementation of Doc_Equals

Detected by a GCC 5.2 warning.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/56e7c206
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/56e7c206
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/56e7c206

Branch: refs/heads/master
Commit: 56e7c206191862822c1a111af4959283069702d1
Parents: 04bd80f
Author: Nick Wellnhofer 
Authored: Thu Mar 24 12:06:24 2016 +0100
Committer: Nick Wellnhofer 
Committed: Thu Mar 24 12:52:32 2016 +0100

--
 perl/xs/Lucy/Document/Doc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/56e7c206/perl/xs/Lucy/Document/Doc.c
--
diff --git a/perl/xs/Lucy/Document/Doc.c b/perl/xs/Lucy/Document/Doc.c
index a45f758..902df23 100644
--- a/perl/xs/Lucy/Document/Doc.c
+++ b/perl/xs/Lucy/Document/Doc.c
@@ -228,7 +228,7 @@ LUCY_Doc_Equals_IMP(lucy_Doc *self, cfish_Obj *other) {
 lucy_DocIVARS *const ivars = lucy_Doc_IVARS(self);
 lucy_DocIVARS *const ovars = lucy_Doc_IVARS((lucy_Doc*)other);
 
-if (!ivars->doc_id == ovars->doc_id)   { return false; }
+if (!!ivars->doc_id ^ !!ovars->doc_id) { return false; }
 if (!!ivars->fields ^ !!ovars->fields) { return false; }
 
 // Verify fields.  Don't allow any deep data structures.



[lucy] Git Push Summary

2016-03-24 Thread nwellnhof
Repository: lucy
Updated Tags:  refs/tags/apache-lucy-0.5.0-rc3 [created] 3a814fdff


[1/2] lucy git commit: Fix bug in Perl implementation of Doc_Equals

2016-03-24 Thread nwellnhof
Repository: lucy
Updated Branches:
  refs/heads/0.5 557fdbca6 -> 6ca063705


Fix bug in Perl implementation of Doc_Equals

Detected by a GCC 5.2 warning.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/c611622d
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/c611622d
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/c611622d

Branch: refs/heads/0.5
Commit: c611622d929770f266e0443d5f6d94991882b43f
Parents: 557fdbc
Author: Nick Wellnhofer 
Authored: Thu Mar 24 12:06:24 2016 +0100
Committer: Nick Wellnhofer 
Committed: Thu Mar 24 12:06:24 2016 +0100

--
 perl/xs/Lucy/Document/Doc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/c611622d/perl/xs/Lucy/Document/Doc.c
--
diff --git a/perl/xs/Lucy/Document/Doc.c b/perl/xs/Lucy/Document/Doc.c
index a45f758..902df23 100644
--- a/perl/xs/Lucy/Document/Doc.c
+++ b/perl/xs/Lucy/Document/Doc.c
@@ -228,7 +228,7 @@ LUCY_Doc_Equals_IMP(lucy_Doc *self, cfish_Obj *other) {
 lucy_DocIVARS *const ivars = lucy_Doc_IVARS(self);
 lucy_DocIVARS *const ovars = lucy_Doc_IVARS((lucy_Doc*)other);
 
-if (!ivars->doc_id == ovars->doc_id)   { return false; }
+if (!!ivars->doc_id ^ !!ovars->doc_id) { return false; }
 if (!!ivars->fields ^ !!ovars->fields) { return false; }
 
 // Verify fields.  Don't allow any deep data structures.



[2/2] lucy git commit: Fix test_all.sh script for newer Go versions

2016-03-24 Thread nwellnhof
Fix test_all.sh script for newer Go versions

When cleaning the CFC build before building the Clownfish runtime and
Lucy, I get an error with Go 1.5 because "CFC.h" could not be found.
I'm not sure what's at play here. Cleaning the CFC build afterwards
is only a band-aid. This needs some further investigation.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/6ca06370
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/6ca06370
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/6ca06370

Branch: refs/heads/0.5
Commit: 6ca063705ea8c4140ba6cdfe548eced9cf5edda0
Parents: c611622
Author: Nick Wellnhofer 
Authored: Thu Mar 24 12:16:37 2016 +0100
Committer: Nick Wellnhofer 
Committed: Thu Mar 24 12:16:37 2016 +0100

--
 devel/bin/test_all.sh | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/6ca06370/devel/bin/test_all.sh
--
diff --git a/devel/bin/test_all.sh b/devel/bin/test_all.sh
index c5c94b6..54fc496 100755
--- a/devel/bin/test_all.sh
+++ b/devel/bin/test_all.sh
@@ -52,7 +52,11 @@ set -x
 rm -rf "$tmp_dir"
 
 if [ -z "$1" -o "$1" = go ]; then
-export GOPATH="$tmp_dir/go:$GOPATH"
+if [ -z "$GOPATH" ]; then
+export GOPATH="$tmp_dir/go"
+else
+export GOPATH="$tmp_dir/go:$GOPATH"
+fi
 mkdir -p "$tmp_dir/go/src/git-wip-us.apache.org/repos/asf"
 ln -s "$cfish_dir" \
 "$tmp_dir/go/src/git-wip-us.apache.org/repos/asf/lucy-clownfish.git"
@@ -62,15 +66,18 @@ if [ -z "$1" -o "$1" = go ]; then
 cd "$cfish_dir/compiler/go"
 go run build.go test
 go run build.go install
-go run build.go clean
 
 cd ../../runtime/go
 go run build.go test
 go run build.go install
-go run build.go clean
 
 cd "$lucy_dir/go"
 go run build.go test
+
+go run build.go clean
+cd "$cfish_dir/runtime/go"
+go run build.go clean
+cd "$cfish_dir/compiler/go"
 go run build.go clean
 
 cd "$root"



svn commit: r12841 - in /dev/lucy: apache-lucy-0.5.0-rc1/ apache-lucy-0.5.0-rc2/ clownfish/apache-clownfish-0.4.2-rc1/ clownfish/apache-clownfish-0.5.0-rc1/

2016-03-24 Thread nwellnhof
Author: nwellnhof
Date: Thu Mar 24 11:35:29 2016
New Revision: 12841

Log:
Delete old release candidates

Removed:
dev/lucy/apache-lucy-0.5.0-rc1/
dev/lucy/apache-lucy-0.5.0-rc2/
dev/lucy/clownfish/apache-clownfish-0.4.2-rc1/
dev/lucy/clownfish/apache-clownfish-0.5.0-rc1/



svn commit: r12840 - in /dev/lucy/apache-lucy-0.5.0-rc3: CHANGES-0.5.0.txt apache-lucy-0.5.0.tar.gz apache-lucy-0.5.0.tar.gz.asc apache-lucy-0.5.0.tar.gz.md5 apache-lucy-0.5.0.tar.gz.sha

2016-03-24 Thread nwellnhof
Author: nwellnhof
Date: Thu Mar 24 11:27:04 2016
New Revision: 12840

Log:
Add apache-lucy-0.5.0 artifacts

Added:
dev/lucy/apache-lucy-0.5.0-rc3/CHANGES-0.5.0.txt
dev/lucy/apache-lucy-0.5.0-rc3/apache-lucy-0.5.0.tar.gz   (with props)
dev/lucy/apache-lucy-0.5.0-rc3/apache-lucy-0.5.0.tar.gz.asc
dev/lucy/apache-lucy-0.5.0-rc3/apache-lucy-0.5.0.tar.gz.md5
dev/lucy/apache-lucy-0.5.0-rc3/apache-lucy-0.5.0.tar.gz.sha

Added: dev/lucy/apache-lucy-0.5.0-rc3/CHANGES-0.5.0.txt
==
--- dev/lucy/apache-lucy-0.5.0-rc3/CHANGES-0.5.0.txt (added)
+++ dev/lucy/apache-lucy-0.5.0-rc3/CHANGES-0.5.0.txt Thu Mar 24 11:27:04 2016
@@ -0,0 +1,234 @@
+Revision history for Lucy
+
+0.5.0  2016-03-04
+
+  New features:
+
+* [LUCY-275] - Proof-of-concept Go bindings
+
+  Bugfixes:
+
+* [LUCY-273] - Require specific version of Clownfish
+* [LUCY-287] - Mismatch between required Clownfish versions
+* [LUCY-288] - Add Clownfish to configure_requires
+
+  Improvements:
+
+* [LUCY-274] - Refcounting needs to use functions rather than methods
+* [LUCY-277] - Autogenerate Go Bindings
+* [LUCY-279] - Prepare for removal of Obj methods
+* [LUCY-281] - Port host-specific Lucy code to Go/CGO
+* [LUCY-282] - Refine and test Go bindings
+* [LUCY-284] - Support multiple Go types as document
+* [LUCY-285] - Run core tests under Go bindings
+* [LUCY-289] - Check for incompatible Clownfish major version
+
+  Tasks:
+
+* [LUCY-290] - Review generated C API documentation
+
+
+0.4.4  2016-01-31
+
+  Bugfixes:
+
+* [LUCY-287] - Mismatch between required Clownfish versions
+* [LUCY-288] - Add Clownfish to configure_requires
+* Fix Windows build for some CPAN Testers setups (see CLOWNFISH-3).
+
+
+0.4.3  2016-01-09
+
+  Improvements:
+
+* Check for incompatible Clownfish major version.
+* Improve build and installation scripts for C library.
+
+
+0.4.2  2014-11-18
+
+  Bugfixes:
+
+* [LUCY-272] - Wrong encoding of extremely small similarity values
+
+
+0.4.1  2014-09-25
+
+  Bugfixes:
+
+* [LUCY-269] - Field names with underscores break query parser
+* [LUCY-270] - RegexTokenizer broken in C bindings
+
+
+0.4.0  2014-08-21
+
+  Bugfixes:
+
+* [LUCY-199] - Highlighting/excerpt on URLs
+* [LUCY-211] - MSVC 6 support
+* [LUCY-234] - Brittle object struct ABI
+* [LUCY-240] - Build Broken on clang
+* [LUCY-254] - Creation of Charmonizer temp files sometimes fails on
+   Windows
+* [LUCY-261] - Include paths for benchmark scripts
+* [LUCY-263] - MemoryPool's Release_All() should free
+* [LUCY-265] - Index lockfiles left behind
+
+  New features:
+
+* [LUCY-250] - Add delete_by_doc_id to Lucy::Index::Indexer
+
+  Tasks:
+
+* [LUCY-201] - Port CFC tests to C
+* [LUCY-212] - The "language" parameter to PolyAnalyzer#new is deprecated
+* [LUCY-214] - Port terminfo tests to C
+* [LUCY-222] - Port span tests to C
+* [LUCY-246] - Migrate Apache Lucy to Git
+* [LUCY-257] - Separate Clownfish from Lucy
+
+
+0.3.3  2013-07-22
+
+  Bugfixes:
+
+* [LUCY-239] - Simplify JSON Parser Y File
+* [LUCY-243] - Trap remove errno and warn
+* [LUCY-245] - Charmonizer fails to detect syntax for 64-bit integer
+  literals
+* [LUCY-259] - Compensate for Perl export flakiness of to_utf8_lower
+
+0.3.2  2012-07-05
+
+  Bugfixes:
+
+* [LUCY-238] - Improve reliability of loading from JSON
+
+
+0.3.1  2012-05-04
+
+  Bugfixes:
+
+* [LUCY-213] - Explicit version number for each Perl module
+* [LUCY-216] - t/152-inversion.t failure
+* [LUCY-235] - Don't ship dev-only tests with CPAN tarball
+
+  Tasks:
+
+* [LUCY-218] - Adapt codebase for TLP status
+
+
+0.3.0  2012-01-15
+
+  New features:
+
+* [LUCY-173] - Bundle Lemon parser generator
+* [LUCY-189] - Bundle utf8proc
+* [LUCY-191] - Unicode normalization
+  The new analyzer Lucy::Analysis::Normalizer provides Unicode
+  normalization, case folding and stripping of accents.
+* [LUCY-196] - UAX #29 tokenizer
+  The new analyzer Lucy::Analysis::StandardTokenizer tokenizes according
+  to the UAX #29 word break rules.
+* [LUCY-203] - Implement EasyAnalyzer
+  EasyAnalyzer is simple analysis chain using the StandardTokenizer, the
+  Normalizer, and the SnowballStemmer.
+
+  Bugfixes:
+
+* [LUCY-175] - Missing stdarg.h breaks build
+* [LUCY-176] - More INCREF/DECREF symbol collisions under Windows
+* [LUCY-178] - Discriminate between stdio and POSIX in large file support
+   probing.
+* [LUCY-180] - ORQuery, ANDQuery, RequiredOptionalQuery optimizations
+   affect scoring
+* [LUCY-181] - Perl Documentation fix - Remove links to classes within
+   docs, that are not exposed to Perl
+* [LUCY-182] - highlighter bug when searching for dupli

svn commit: r12839 - /dev/lucy/apache-lucy-0.5.0-rc3/

2016-03-24 Thread nwellnhof
Author: nwellnhof
Date: Thu Mar 24 11:26:17 2016
New Revision: 12839

Log:
Create RC dir for apache-lucy-0.5.0-rc3

Added:
dev/lucy/apache-lucy-0.5.0-rc3/



[lucy] Git Push Summary

2016-03-24 Thread nwellnhof
Repository: lucy
Updated Tags:  refs/tags/apache-lucy-0.5.0-rc2 [created] 46c0c0ffa


svn commit: r12837 - /dev/lucy/apache-lucy-0.5.0-rc2/

2016-03-24 Thread nwellnhof
Author: nwellnhof
Date: Thu Mar 24 10:24:28 2016
New Revision: 12837

Log:
Create RC dir for apache-lucy-0.5.0-rc2

Added:
dev/lucy/apache-lucy-0.5.0-rc2/



[lucy-clownfish] Git Push Summary

2016-03-24 Thread nwellnhof
Repository: lucy-clownfish
Updated Tags:  refs/tags/apache-clownfish-0.5.0-rc2 [created] 0bdb09a79


svn commit: r12836 - in /dev/lucy/clownfish/apache-clownfish-0.5.0-rc2: CHANGES-0.5.0.txt apache-clownfish-0.5.0.tar.gz apache-clownfish-0.5.0.tar.gz.asc apache-clownfish-0.5.0.tar.gz.md5 apache-clown

2016-03-24 Thread nwellnhof
Author: nwellnhof
Date: Thu Mar 24 10:21:22 2016
New Revision: 12836

Log:
Add apache-clownfish-0.5.0 artifacts

Added:
dev/lucy/clownfish/apache-clownfish-0.5.0-rc2/CHANGES-0.5.0.txt
dev/lucy/clownfish/apache-clownfish-0.5.0-rc2/apache-clownfish-0.5.0.tar.gz 
  (with props)

dev/lucy/clownfish/apache-clownfish-0.5.0-rc2/apache-clownfish-0.5.0.tar.gz.asc

dev/lucy/clownfish/apache-clownfish-0.5.0-rc2/apache-clownfish-0.5.0.tar.gz.md5

dev/lucy/clownfish/apache-clownfish-0.5.0-rc2/apache-clownfish-0.5.0.tar.gz.sha

Added: dev/lucy/clownfish/apache-clownfish-0.5.0-rc2/CHANGES-0.5.0.txt
==
--- dev/lucy/clownfish/apache-clownfish-0.5.0-rc2/CHANGES-0.5.0.txt (added)
+++ dev/lucy/clownfish/apache-clownfish-0.5.0-rc2/CHANGES-0.5.0.txt Thu Mar 24 
10:21:22 2016
@@ -0,0 +1,101 @@
+Revision history for Apache Clownfish
+
+0.5.0  2016-03-04
+
+  New features:
+
+* [CLOWNFISH-2] - Create iterator for Hash
+* [CLOWNFISH-19] - Go (golang) bindings for CFC
+* [CLOWNFISH-23] - Markdown for documentation
+* [CLOWNFISH-26] - Markdown for standalone documentation files
+* [CLOWNFISH-28] - Proof-of-concept Go bindings
+* [CLOWNFISH-46] - Travis CI with multiple host languages
+* [CLOWNFISH-64] - Autogenerate subroutine code samples in Perl POD
+* [CLOWNFISH-66] - Python-specific CFC
+* [CLOWNFISH-71] - Autogenerate HTML documentation for C API
+* [CLOWNFISH-72] - Document Clownfish internals like header file language
+* [CLOWNFISH-75] - Add Clownfish page to lucy.apache.org
+
+  Bugfixes:
+
+* [CLOWNFISH-3] - Charmonizer bombs out trying to set warnings as errors
+  with Strawberry Perl
+* [CLOWNFISH-9] - Make most Clownfish core types final
+* [CLOWNFISH-24] - Error handling in C bindings is not thread-safe
+* [CLOWNFISH-33] - Duplicate hash entries
+* [CLOWNFISH-37] - Order of refcount manipulation when overwriting
+* [CLOWNFISH-45] - Dynamically subclassing a final class should fail
+* [CLOWNFISH-47] - Tighten up final method code gen and optimization
+* [CLOWNFISH-62] - Crash when passing Perl variable as decremented arg
+* [CLOWNFISH-63] - Don't export private methods via Go
+* [CLOWNFISH-69] - Clownfish::CFC missing from CPAN prereqs
+
+  Improvements:
+
+* [CLOWNFISH-7] - String-only keys for Hash
+* [CLOWNFISH-11] - Rework ByteBuf
+* [CLOWNFISH-15] - Method OFFSET vars should be uint32_t instead of
+   size_t
+* [CLOWNFISH-27] - Use functions rather than methods for refcounting
+* [CLOWNFISH-29] - Use PERL_NO_GET_CONTEXT
+* [CLOWNFISH-30] - Eliminate autogenerated "callbacks.h"
+* [CLOWNFISH-34] - String-only keys for LFReg
+* [CLOWNFISH-35] - Use size_t for Array and Hash indices
+* [CLOWNFISH-39] - Public Vector API
+* [CLOWNFISH-40] - LockFreeRegistry should be private
+* [CLOWNFISH-42] - Move NumberUtils to Lucy
+* [CLOWNFISH-49] - Remove Obj_Mimic, Obj_To_[FI]64, Obj_To_Bool
+* [CLOWNFISH-50] - Convert some Obj methods to inert functions
+* [CLOWNFISH-51] - Go glue should convert clownfish.String to Go string
+* [CLOWNFISH-52] - Implement To_Host methods for core types
+* [CLOWNFISH-53] - Support MSVC in C mode
+* [CLOWNFISH-56] - Map Clownfish composite types to Go host types
+* [CLOWNFISH-57] - Map clownfish.Obj to Go empty interface
+* [CLOWNFISH-58] - Refine Hash API
+* [CLOWNFISH-59] - Refine Go bindings
+* [CLOWNFISH-61] - Run core tests under Go bindings
+* [CLOWNFISH-65] - Refresh intro docs
+* [CLOWNFISH-70] - Export major version from Perl bindings
+* [CLOWNFISH-79] - Improve generated Perl bindings
+
+0.4.4 2016-01-26
+
+  Bugfixes:
+
+* [CLOWNFISH-3] - Charmonizer bombs out trying to set warnings as
+  errors with Strawberry Perl
+* [CLOWNFISH-69] - Clownfish::CFC missing from CPAN prereqs
+
+0.4.3 2016-01-09
+
+  Bugfixes:
+
+* [CLOWNFISH-33] - Duplicate hash entries
+
+  Improvements:
+
+* Fix build and test suite under Strawberry Perl.
+* Improve installation scripts for C library.
+
+0.4.2 2014-12-16
+
+  Bugfixes:
+
+* [CLOWNFISH-18] - Determine Clownfish include dirs at build time
+
+0.4.1 2014-09-25
+
+  Bugfixes:
+
+* [CLOWNFISH-4] - Account for compiler names with invalid leading
+  whitespace
+* [CLOWNFISH-5] - Add stub Clownfish/CFC/Model/Version.pm
+* [CLOWNFISH-6] - Update issue tracker in dist metadata
+* [CLOWNFISH-8] - CPAN smokers fail to build Lucy
+* [CLOWNFISH-16] - Support arguments in $Config{cc}
+* [CLOWNFISH-17] - Bump Devel::PPPort dependency to version 3.14
+
+0.4.0  2014-08-19
+
+  Initial independent release after separation from Apache Lucy.
+

Added: 
dev/lucy/clownfish/apache-clownfish-0.5.0-rc2/apache-clownfish-0.

svn commit: r12835 - /dev/lucy/clownfish/apache-clownfish-0.5.0-rc2/

2016-03-24 Thread nwellnhof
Author: nwellnhof
Date: Thu Mar 24 10:20:04 2016
New Revision: 12835

Log:
Create RC dir for apache-clownfish-0.5.0-rc2

Added:
dev/lucy/clownfish/apache-clownfish-0.5.0-rc2/



lucy-clownfish git commit: Fix compiler warnings in XSBind.c

2016-03-23 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/master 39b0cb0c4 -> 77c771d02


Fix compiler warnings in XSBind.c


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/77c771d0
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/77c771d0
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/77c771d0

Branch: refs/heads/master
Commit: 77c771d02aeef9939b56af39439777b26c9d2cec
Parents: 39b0cb0
Author: Nick Wellnhofer 
Authored: Wed Mar 23 16:06:14 2016 +0100
Committer: Nick Wellnhofer 
Committed: Wed Mar 23 16:44:43 2016 +0100

--
 runtime/perl/xs/XSBind.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/77c771d0/runtime/perl/xs/XSBind.c
--
diff --git a/runtime/perl/xs/XSBind.c b/runtime/perl/xs/XSBind.c
index f0bf99c..17f0266 100644
--- a/runtime/perl/xs/XSBind.c
+++ b/runtime/perl/xs/XSBind.c
@@ -1105,7 +1105,7 @@ CFISH_Hash_To_Host_IMP(cfish_Hash *self, void *vcache) {
 
 // Using a negative `klen` argument to signal UTF-8 is undocumented
 // in older Perl versions but works since 5.8.0.
-hv_store(perl_hash, key_ptr, -key_size, val_sv, 0);
+(void)hv_store(perl_hash, key_ptr, -key_size, val_sv, 0);
 }
 
 if (cache == _cache && cache->seen) {
@@ -1195,11 +1195,13 @@ cfish_TestUtils_clone_host_runtime() {
 
 void
 cfish_TestUtils_set_host_runtime(void *runtime) {
+CFISH_UNUSED_VAR(runtime);
 CFISH_THROW(CFISH_ERR, "No thread support");
 }
 
 void
 cfish_TestUtils_destroy_host_runtime(void *runtime) {
+CFISH_UNUSED_VAR(runtime);
 CFISH_THROW(CFISH_ERR, "No thread support");
 }
 



lucy-clownfish git commit: Fix compiler warnings in XSBind.c

2016-03-23 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/0.5 c83c71364 -> 33651d757


Fix compiler warnings in XSBind.c


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/33651d75
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/33651d75
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/33651d75

Branch: refs/heads/0.5
Commit: 33651d757941fd4c4686cf942880e9006d813796
Parents: c83c713
Author: Nick Wellnhofer 
Authored: Wed Mar 23 16:06:14 2016 +0100
Committer: Nick Wellnhofer 
Committed: Wed Mar 23 16:13:54 2016 +0100

--
 runtime/perl/xs/XSBind.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/33651d75/runtime/perl/xs/XSBind.c
--
diff --git a/runtime/perl/xs/XSBind.c b/runtime/perl/xs/XSBind.c
index 85bd85b..7a5662e 100644
--- a/runtime/perl/xs/XSBind.c
+++ b/runtime/perl/xs/XSBind.c
@@ -931,7 +931,7 @@ CFISH_Hash_To_Host_IMP(cfish_Hash *self) {
 
 // Using a negative `klen` argument to signal UTF-8 is undocumented
 // in older Perl versions but works since 5.8.0.
-hv_store(perl_hash, key_ptr, -key_size, val_sv, 0);
+(void)hv_store(perl_hash, key_ptr, -key_size, val_sv, 0);
 }
 
 CFISH_DECREF(iter);
@@ -1014,11 +1014,13 @@ cfish_TestUtils_clone_host_runtime() {
 
 void
 cfish_TestUtils_set_host_runtime(void *runtime) {
+CFISH_UNUSED_VAR(runtime);
 CFISH_THROW(CFISH_ERR, "No thread support");
 }
 
 void
 cfish_TestUtils_destroy_host_runtime(void *runtime) {
+CFISH_UNUSED_VAR(runtime);
 CFISH_THROW(CFISH_ERR, "No thread support");
 }
 



lucy-clownfish git commit: Rework rounding in Memory_oversize

2016-03-20 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/master c1ed8ee70 -> 39b0cb0c4


Rework rounding in Memory_oversize

Fixes -Wconversion warning on 32-bit.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/39b0cb0c
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/39b0cb0c
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/39b0cb0c

Branch: refs/heads/master
Commit: 39b0cb0c48bc122a3854dd2ccb7332c41d7e9db6
Parents: c1ed8ee
Author: Nick Wellnhofer 
Authored: Sun Mar 20 22:20:54 2016 +0100
Committer: Nick Wellnhofer 
Committed: Sun Mar 20 22:26:44 2016 +0100

--
 runtime/core/Clownfish/Test/Util/TestMemory.c |  2 +-
 runtime/core/Clownfish/Util/Memory.c  | 51 +++---
 2 files changed, 27 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/39b0cb0c/runtime/core/Clownfish/Test/Util/TestMemory.c
--
diff --git a/runtime/core/Clownfish/Test/Util/TestMemory.c 
b/runtime/core/Clownfish/Test/Util/TestMemory.c
index 2800708..8151c72 100644
--- a/runtime/core/Clownfish/Test/Util/TestMemory.c
+++ b/runtime/core/Clownfish/Test/Util/TestMemory.c
@@ -98,7 +98,7 @@ test_oversize__rounding(TestBatchRunner *runner) {
 for (unsigned i = 0; i < 25; i++) {
 size_t size = Memory_oversize(i, width);
 size_t bytes = size * width;
-if (bytes % sizeof(void*) != 0) {
+if (bytes % sizeof(size_t) != 0) {
 FAIL(runner, "Rounding failure for %u, width %u",
  i, width);
 return;

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/39b0cb0c/runtime/core/Clownfish/Util/Memory.c
--
diff --git a/runtime/core/Clownfish/Util/Memory.c 
b/runtime/core/Clownfish/Util/Memory.c
index 66f7291..2ab4486 100644
--- a/runtime/core/Clownfish/Util/Memory.c
+++ b/runtime/core/Clownfish/Util/Memory.c
@@ -77,33 +77,34 @@ Memory_oversize(size_t minimum, size_t width) {
 
 // Round up for small widths so that the number of bytes requested will be
 // a multiple of the machine's word size.
-if (sizeof(size_t) == 8) { // 64-bit
-switch (width) {
-case 1:
-amount = (amount + 7) & INT64_C(0xFFF8);
-break;
-case 2:
-amount = (amount + 3) & INT64_C(0xFFFC);
-break;
-case 4:
-amount = (amount + 1) & INT64_C(0xFFFE);
-break;
-default:
-break;
-}
+#if CHY_SIZEOF_SIZE_T == 8
+// 64-bit
+switch (width) {
+case 1:
+amount = (amount + 7) & ~(size_t)7;
+break;
+case 2:
+amount = (amount + 3) & ~(size_t)3;
+break;
+case 4:
+amount = (amount + 1) & ~(size_t)1;
+break;
+default:
+break;
 }
-else { // 32-bit
-switch (width) {
-case 1:
-amount = (amount + 3) & ((size_t)0xFFFC);
-break;
-case 2:
-amount = (amount + 1) & ((size_t)0xFFFE);
-break;
-default:
-break;
-}
+#else /* CHY_SIZEOF_SIZE_T == 8 */
+// 32-bit
+switch (width) {
+case 1:
+amount = (amount + 3) & ~(size_t)3;
+break;
+case 2:
+amount = (amount + 1) & ~(size_t)1;
+break;
+default:
+break;
 }
+#endif /* CHY_SIZEOF_SIZE_T == 8 */
 
 return amount;
 }



lucy git commit: Adjust for Obj_to_Host changes

2016-03-20 Thread nwellnhof
Repository: lucy
Updated Branches:
  refs/heads/master b9fba0dad -> d657bd167


Adjust for Obj_to_Host changes


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/d657bd16
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/d657bd16
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/d657bd16

Branch: refs/heads/master
Commit: d657bd1678ec81cfba11ae177bc8ffcc753d2cee
Parents: b9fba0d
Author: Nick Wellnhofer 
Authored: Sun Mar 20 18:47:58 2016 +0100
Committer: Nick Wellnhofer 
Committed: Sun Mar 20 18:47:58 2016 +0100

--
 perl/buildlib/Lucy/Build/Binding/Misc.pm | 2 +-
 perl/buildlib/Lucy/Build/Binding/Util.pm | 2 +-
 perl/xs/Lucy/Analysis/RegexTokenizer.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/d657bd16/perl/buildlib/Lucy/Build/Binding/Misc.pm
--
diff --git a/perl/buildlib/Lucy/Build/Binding/Misc.pm 
b/perl/buildlib/Lucy/Build/Binding/Misc.pm
index c87e2c2..11b14a6 100644
--- a/perl/buildlib/Lucy/Build/Binding/Misc.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Misc.pm
@@ -59,7 +59,7 @@ PPCODE:
 LUCY_OutStream_Close(target);
 serialized_bb
 = LUCY_RAMFile_Get_Contents(LUCY_RAMFH_Get_File(file_handle));
-retval = (SV*)CFISH_BB_To_Host(serialized_bb);
+retval = (SV*)CFISH_BB_To_Host(serialized_bb, NULL);
 CFISH_DECREF(file_handle);
 CFISH_DECREF(target);
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/d657bd16/perl/buildlib/Lucy/Build/Binding/Util.pm
--
diff --git a/perl/buildlib/Lucy/Build/Binding/Util.pm 
b/perl/buildlib/Lucy/Build/Binding/Util.pm
index 89a80e8..2b09173 100644
--- a/perl/buildlib/Lucy/Build/Binding/Util.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Util.pm
@@ -157,7 +157,7 @@ latest_snapshot(folder)
 CODE:
 {
 cfish_String *latest = lucy_IxFileNames_latest_snapshot(folder);
-RETVAL = (SV*)CFISH_Str_To_Host(latest);
+RETVAL = (SV*)CFISH_Str_To_Host(latest, NULL);
 CFISH_DECREF(latest);
 }
 OUTPUT: RETVAL

http://git-wip-us.apache.org/repos/asf/lucy/blob/d657bd16/perl/xs/Lucy/Analysis/RegexTokenizer.c
--
diff --git a/perl/xs/Lucy/Analysis/RegexTokenizer.c 
b/perl/xs/Lucy/Analysis/RegexTokenizer.c
index f8e5e36..b558875 100644
--- a/perl/xs/Lucy/Analysis/RegexTokenizer.c
+++ b/perl/xs/Lucy/Analysis/RegexTokenizer.c
@@ -85,7 +85,7 @@ S_compile_token_re(pTHX_ cfish_String *pattern) {
 SAVETMPS;
 EXTEND(SP, 1);
 PUSHMARK(SP);
-XPUSHs((SV*)CFISH_Str_To_Host(pattern));
+XPUSHs((SV*)CFISH_Str_To_Host(pattern, NULL));
 PUTBACK;
 call_pv("Lucy::Analysis::RegexTokenizer::_compile_token_re", G_SCALAR);
 SPAGAIN;



[14/14] lucy-clownfish git commit: Merge branch 'threadsafe-bootstrap'

2016-03-19 Thread nwellnhof
Merge branch 'threadsafe-bootstrap'

Fixes CLOWNFISH-78.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/fa009460
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/fa009460
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/fa009460

Branch: refs/heads/master
Commit: fa009460e27cb9873fa59e4f53ba5416f8531aae
Parents: 94eed76 7cc75eb
Author: Nick Wellnhofer 
Authored: Sat Mar 19 18:22:46 2016 +0100
Committer: Nick Wellnhofer 
Committed: Sat Mar 19 18:22:46 2016 +0100

--
 compiler/src/CFCBindCore.c|  56 +++---
 compiler/src/CFCBindSpecs.c   |  24 -
 runtime/c/src/tls.c   |   9 +-
 runtime/core/Clownfish/Boolean.c  |  21 ++--
 runtime/core/Clownfish/Class.c| 142 +
 runtime/core/Clownfish/Class.cfh  |  25 ++---
 runtime/core/Clownfish/Hash.c |   6 +-
 runtime/core/Clownfish/Method.c   |   7 +-
 runtime/core/Clownfish/Test.c |   2 +
 runtime/core/Clownfish/Test/TestClass.c   |  93 
 runtime/core/Clownfish/Test/TestClass.cfh |  28 +
 runtime/go/clownfish/class_test.go|   4 +-
 runtime/perl/t/core/010-class.t   |  23 
 runtime/perl/xs/XSBind.c  |   5 +-
 14 files changed, 304 insertions(+), 141 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/fa009460/runtime/core/Clownfish/Test.c
--

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/fa009460/runtime/perl/xs/XSBind.c
--



[01/14] lucy-clownfish git commit: Implement pointer-to-pointer hash table

2016-03-19 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/master f5139fff5 -> fa009460e


Implement pointer-to-pointer hash table


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/6c8dbb36
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/6c8dbb36
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/6c8dbb36

Branch: refs/heads/master
Commit: 6c8dbb36de4171950264c54ea813f1bba275bc61
Parents: 20eef8f
Author: Nick Wellnhofer 
Authored: Tue Mar 8 11:54:30 2016 +0100
Committer: Nick Wellnhofer 
Committed: Thu Mar 10 14:28:49 2016 +0100

--
 runtime/core/Clownfish/PtrHash.c| 226 +++
 runtime/core/Clownfish/PtrHash.h|  53 ++
 runtime/core/Clownfish/Test.c   |   2 +
 runtime/core/Clownfish/Test/TestPtrHash.c   | 108 +++
 runtime/core/Clownfish/Test/TestPtrHash.cfh |  29 +++
 runtime/perl/t/core/050-ptrhash.t   |  23 +++
 6 files changed, 441 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/6c8dbb36/runtime/core/Clownfish/PtrHash.c
--
diff --git a/runtime/core/Clownfish/PtrHash.c b/runtime/core/Clownfish/PtrHash.c
new file mode 100644
index 000..9d42622
--- /dev/null
+++ b/runtime/core/Clownfish/PtrHash.c
@@ -0,0 +1,226 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include 
+#include 
+
+#include "charmony.h"
+
+#define CFISH_USE_SHORT_NAMES
+#include "Clownfish/PtrHash.h"
+#include "Clownfish/Err.h"
+#include "Clownfish/Util/Memory.h"
+
+#undef PTRHASH_STATS
+
+#ifdef PTRHASH_STATS
+  #include 
+#endif
+
+#if CHAR_BIT * CHY_SIZEOF_PTR <= 32
+  #define PTR_BITS 32
+#else
+  #define PTR_BITS 64
+#endif
+
+#define MAX_FILL_FACTOR 0.625
+
+typedef struct PtrHashEntry {
+void *key;
+void *value;
+} PtrHashEntry;
+
+struct PtrHash {
+size_t num_items;
+size_t cap;
+intshift;
+PtrHashEntry *entries;
+PtrHashEntry *end;
+};
+
+static CFISH_INLINE size_t
+SI_find_index(void *key, int shift);
+
+static CFISH_INLINE size_t
+SI_get_cap(size_t size);
+
+static void
+S_resize(PtrHash *self);
+
+PtrHash*
+PtrHash_new(size_t min_cap) {
+PtrHash *self   = (PtrHash*)MALLOCATE(sizeof(PtrHash));
+
+// Use minimum size of 8.
+// size == 2 ** (PTR_BITS - shift)
+size_t size  = 8;
+intshift = PTR_BITS - 3;
+size_t cap   = SI_get_cap(size);
+
+while (cap < min_cap) {
+if (size > SIZE_MAX / 2 || shift == 0) {
+THROW(ERR, "PtrHash size overflow");
+}
+size  *= 2;
+shift -= 1;
+cap= SI_get_cap(size);
+}
+
+self->num_items = 0;
+self->cap   = cap;
+self->shift = shift;
+self->entries   = (PtrHashEntry*)CALLOCATE(size, sizeof(PtrHashEntry));
+self->end   = >entries[size];
+
+return self;
+}
+
+void
+PtrHash_Destroy(PtrHash *self) {
+FREEMEM(self->entries);
+FREEMEM(self);
+}
+
+// Multiplicative hash function using the prime nearest to the golden ratio.
+// Reasonably good and very fast.
+static CFISH_INLINE size_t
+SI_find_index(void *key, int shift) {
+#if PTR_BITS == 32
+uint32_t value = (uint32_t)key * 0x9E3779B1u;
+#else
+uint64_t value = (uint64_t)key * UINT64_C(0x9E3779B97F4A7C55);
+#endif
+return (size_t)(value >> shift);
+}
+
+static CFISH_INLINE size_t
+SI_get_cap(size_t size) {
+return (size_t)(MAX_FILL_FACTOR * size);
+}
+
+void
+PtrHash_Store(PtrHash *self, void *key, void *value) {
+if (key == NULL) {
+THROW(ERR, "Can't store NULL key");
+}
+
+size_t index = SI_find_index(key, self->shift);
+PtrHashEntry *entry = >entries[index];
+
+while (entry->key != NULL) {
+if (entry->key == key) {
+entry->value = value;
+return;
+}
+
+entry += 1;
+if (entry >= self->end) { entry = self->entries; }
+}
+
+if (self->num_items >= self->cap) {
+  

[08/14] lucy-clownfish git commit: Make cfish_init_parcel thread-safe

2016-03-19 Thread nwellnhof
Make cfish_init_parcel thread-safe

Initialize globals with compare-and-swap.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/7528af45
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/7528af45
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/7528af45

Branch: refs/heads/master
Commit: 7528af4514e1ddea3c99bf9f6dcc4392c1f1b8e2
Parents: d7c863b
Author: Nick Wellnhofer 
Authored: Thu Mar 10 19:33:51 2016 +0100
Committer: Nick Wellnhofer 
Committed: Thu Mar 10 21:45:10 2016 +0100

--
 runtime/c/src/tls.c  |  9 +++--
 runtime/core/Clownfish/Boolean.c | 21 +++--
 runtime/core/Clownfish/Hash.c|  6 +-
 runtime/perl/xs/XSBind.c |  5 -
 4 files changed, 31 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/7528af45/runtime/c/src/tls.c
--
diff --git a/runtime/c/src/tls.c b/runtime/c/src/tls.c
index b550f13..a7fda40 100644
--- a/runtime/c/src/tls.c
+++ b/runtime/c/src/tls.c
@@ -49,11 +49,16 @@ static DWORD err_context_tls_index;
 
 void
 Tls_init() {
-err_context_tls_index = TlsAlloc();
-if (err_context_tls_index == TLS_OUT_OF_INDEXES) {
+DWORD tls_index = TlsAlloc();
+if (tls_index == TLS_OUT_OF_INDEXES) {
 fprintf(stderr, "TlsAlloc failed (TLS_OUT_OF_INDEXES)\n");
 abort();
 }
+LONG old_index = InterlockedCompareExchange((LONG*)_context_tls_index,
+tls_index, 0);
+if (old_index != 0) {
+TlsFree(tls_index);
+}
 }
 
 ErrContext*

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/7528af45/runtime/core/Clownfish/Boolean.c
--
diff --git a/runtime/core/Clownfish/Boolean.c b/runtime/core/Clownfish/Boolean.c
index fd7c6d9..44a7c48 100644
--- a/runtime/core/Clownfish/Boolean.c
+++ b/runtime/core/Clownfish/Boolean.c
@@ -22,18 +22,26 @@
 
 #include "Clownfish/Class.h"
 #include "Clownfish/String.h"
+#include "Clownfish/Util/Atomic.h"
 
 Boolean *Bool_true_singleton;
 Boolean *Bool_false_singleton;
 
 void
 Bool_init_class() {
-Bool_true_singleton  = (Boolean*)Class_Make_Obj(BOOLEAN);
-Bool_true_singleton->value   = true;
-Bool_true_singleton->string  = Str_newf("true");
-Bool_false_singleton = (Boolean*)Class_Make_Obj(BOOLEAN);
-Bool_false_singleton->value  = false;
-Bool_false_singleton->string = Str_newf("false");
+Boolean *true_obj = (Boolean*)Class_Make_Obj(BOOLEAN);
+true_obj->value   = true;
+true_obj->string  = Str_newf("true");
+if (!Atomic_cas_ptr((void**)_true_singleton, NULL, true_obj)) {
+Bool_Destroy(true_obj);
+}
+
+Boolean *false_obj = (Boolean*)Class_Make_Obj(BOOLEAN);
+false_obj->value   = false;
+false_obj->string  = Str_newf("false");
+if (!Atomic_cas_ptr((void**)_false_singleton, NULL, false_obj)) {
+Bool_Destroy(false_obj);
+}
 }
 
 Boolean*
@@ -44,6 +52,7 @@ Bool_singleton(bool value) {
 void
 Bool_Destroy_IMP(Boolean *self) {
 if (self && self != CFISH_TRUE && self != CFISH_FALSE) {
+DECREF(self->string);
 SUPER_DESTROY(self, BOOLEAN);
 }
 }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/7528af45/runtime/core/Clownfish/Hash.c
--
diff --git a/runtime/core/Clownfish/Hash.c b/runtime/core/Clownfish/Hash.c
index e0e5d80..174cc11 100644
--- a/runtime/core/Clownfish/Hash.c
+++ b/runtime/core/Clownfish/Hash.c
@@ -26,6 +26,7 @@
 #include "Clownfish/String.h"
 #include "Clownfish/Err.h"
 #include "Clownfish/Vector.h"
+#include "Clownfish/Util/Atomic.h"
 #include "Clownfish/Util/Memory.h"
 
 // TOMBSTONE is shared across threads, so it must never be incref'd or
@@ -50,7 +51,10 @@ SI_rebuild_hash(Hash *self);
 
 void
 Hash_init_class() {
-TOMBSTONE = Str_newf("[HASHTOMBSTONE]");
+String *tombstone = Str_newf("[HASHTOMBSTONE]");
+if (!Atomic_cas_ptr((void**), NULL, tombstone)) {
+DECREF(tombstone);
+}
 }
 
 Hash*

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/7528af45/runtime/perl/xs/XSBind.c
--
diff --git a/runtime/perl/xs/XSBind.c b/runtime/perl/xs/XSBind.c
index 85bd85b..b6dd944 100644
--- a/runtime/perl/xs/XSBind.c
+++ b/runtime/perl/xs/XSBind.c
@@ -738,7 +738,10 @@ void
 cfish_Err_init_class(void) {
 dTHX;
 char *file = (char*)__FILE__;
-attempt_xsub = (SV*)newXS(NULL, cfish_Err_attempt_via_xs, file);
+SV *xsub = (SV*)newXS(NULL, cfish_Err_attempt_via_xs, file);

[06/14] lucy-clownfish git commit: Start to make Class_bootstrap thread-safe

2016-03-19 Thread nwellnhof
Start to make Class_bootstrap thread-safe

Use Atomic_cas_ptr to write

- global class pointer
- class name
- class method array


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/ce1fe99c
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/ce1fe99c
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/ce1fe99c

Branch: refs/heads/master
Commit: ce1fe99cf3f45045af77bf717da3b17cb6549ffd
Parents: dc56c14
Author: Nick Wellnhofer 
Authored: Thu Mar 10 18:34:33 2016 +0100
Committer: Nick Wellnhofer 
Committed: Thu Mar 10 21:22:50 2016 +0100

--
 runtime/core/Clownfish/Class.c | 40 ++---
 1 file changed, 33 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/ce1fe99c/runtime/core/Clownfish/Class.c
--
diff --git a/runtime/core/Clownfish/Class.c b/runtime/core/Clownfish/Class.c
index 1ab7523..a96bf96 100644
--- a/runtime/core/Clownfish/Class.c
+++ b/runtime/core/Clownfish/Class.c
@@ -78,7 +78,7 @@ Class_bootstrap(const cfish_ClassSpec *specs, size_t 
num_specs,
 + spec->num_novel_meths
   * sizeof(cfish_method_t);
 
-Class *klass = (Class*)Memory_wrapped_calloc(class_alloc_size, 1);
+Class *klass = (Class*)CALLOCATE(class_alloc_size, 1);
 
 // Needed to calculate size of subclasses.
 klass->class_alloc_size = class_alloc_size;
@@ -92,7 +92,10 @@ Class_bootstrap(const cfish_ClassSpec *specs, size_t 
num_specs,
 }
 
 // Initialize the global pointer to the Class.
-*spec->klass = klass;
+if (!Atomic_cas_ptr((void**)spec->klass, NULL, klass)) {
+// Another thread beat us to it.
+FREEMEM(klass);
+}
 }
 
 /* Pass 2:
@@ -203,9 +206,24 @@ Class_bootstrap(const cfish_ClassSpec *specs, size_t 
num_specs,
 const ClassSpec *spec = [i];
 Class *klass = *spec->klass;
 
-S_set_name(klass, spec->name, strlen(spec->name));
-klass->methods = (Method**)MALLOCATE((spec->num_novel_meths + 1)
- * sizeof(Method*));
+String *name_internal
+= Str_new_from_trusted_utf8(spec->name, strlen(spec->name));
+if (!Atomic_cas_ptr((void**)>name_internal, NULL,
+name_internal)
+   ) {
+DECREF(name_internal);
+name_internal = klass->name_internal;
+}
+
+String *name = Str_new_wrap_trusted_utf8(Str_Get_Ptr8(name_internal),
+ Str_Get_Size(name_internal));
+if (!Atomic_cas_ptr((void**)>name, NULL, name)) {
+DECREF(name);
+name = klass->name;
+}
+
+Method **methods = (Method**)MALLOCATE((spec->num_novel_meths + 1)
+   * sizeof(Method*));
 
 // Only store novel methods for now.
 for (size_t i = 0; i < spec->num_novel_meths; ++i) {
@@ -213,10 +231,18 @@ Class_bootstrap(const cfish_ClassSpec *specs, size_t 
num_specs,
 String *name = SSTR_WRAP_C(mspec->name);
 Method *method = Method_new(name, mspec->callback_func,
 *mspec->offset);
-klass->methods[i] = method;
+methods[i] = method;
 }
 
-klass->methods[spec->num_novel_meths] = NULL;
+methods[spec->num_novel_meths] = NULL;
+
+if (!Atomic_cas_ptr((void**)>methods, NULL, methods)) {
+// Another thread beat us to it.
+for (size_t i = 0; i < spec->num_novel_meths; ++i) {
+Method_Destroy(methods[i]);
+}
+FREEMEM(methods);
+}
 
 Class_add_to_registry(klass);
 }



[04/14] lucy-clownfish git commit: Add extra parameter to Obj_To_Host

2016-03-19 Thread nwellnhof
Add extra parameter to Obj_To_Host

This parameter will be used to pass the conversion cache around.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/f3eea9b2
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/f3eea9b2
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/f3eea9b2

Branch: refs/heads/master
Commit: f3eea9b22fef28df418cc4f71f861d9c7f2ab3d8
Parents: 3e0546f
Author: Nick Wellnhofer 
Authored: Tue Mar 8 11:54:47 2016 +0100
Committer: Nick Wellnhofer 
Committed: Thu Mar 10 14:47:23 2016 +0100

--
 compiler/src/CFCPerlMethod.c|  2 +-
 compiler/src/CFCPerlTypeMap.c   |  2 +-
 runtime/c/src/clownfish.c   | 35 +++
 runtime/core/Clownfish/Blob.cfh |  2 +-
 runtime/core/Clownfish/Boolean.cfh  |  2 +-
 runtime/core/Clownfish/ByteBuf.cfh  |  2 +-
 runtime/core/Clownfish/Hash.cfh |  2 +-
 runtime/core/Clownfish/Num.cfh  |  4 +-
 runtime/core/Clownfish/Obj.cfh  |  2 +-
 runtime/core/Clownfish/String.cfh   |  2 +-
 runtime/core/Clownfish/Vector.cfh   |  2 +-
 runtime/example-lang/src/Clownfish/Obj.c|  2 +-
 runtime/go/ext/clownfish.c  | 38 +
 .../perl/buildlib/Clownfish/Build/Binding.pm| 11 +++--
 runtime/perl/xs/XSBind.c| 45 
 runtime/perl/xs/XSBind.h|  2 +-
 runtime/python/cfext/CFBind.c   | 27 
 runtime/python/cfext/CFBind.h   |  4 +-
 18 files changed, 103 insertions(+), 83 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f3eea9b2/compiler/src/CFCPerlMethod.c
--
diff --git a/compiler/src/CFCPerlMethod.c b/compiler/src/CFCPerlMethod.c
index 911d51d..08d32e2 100644
--- a/compiler/src/CFCPerlMethod.c
+++ b/compiler/src/CFCPerlMethod.c
@@ -456,7 +456,7 @@ S_callback_start(CFCMethod *method) {
 "ENTER;\n"
 "SAVETMPS;\n"
 "PUSHMARK(SP);\n"
-"mPUSHs((SV*)CFISH_Obj_To_Host((cfish_Obj*)self));\n";
+"mPUSHs((SV*)CFISH_Obj_To_Host((cfish_Obj*)self, NULL));\n";
 int num_args = (int)CFCParamList_num_vars(param_list) - 1;
 int num_to_extend = num_args == 0 ? 1
   : num_args == 1 ? 2

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f3eea9b2/compiler/src/CFCPerlTypeMap.c
--
diff --git a/compiler/src/CFCPerlTypeMap.c b/compiler/src/CFCPerlTypeMap.c
index c975c4f..d416284 100644
--- a/compiler/src/CFCPerlTypeMap.c
+++ b/compiler/src/CFCPerlTypeMap.c
@@ -278,7 +278,7 @@ CFCPerlTypeMap_write_xs_typemap(CFCHierarchy *hierarchy) {
 class_var, ", ", allocation, ");\n\n", NULL);
 
 output = CFCUtil_cat(output, class_var, "_\n"
- "$arg = 
(SV*)CFISH_Obj_To_Host((cfish_Obj*)$var);\n"
+ "$arg = 
(SV*)CFISH_Obj_To_Host((cfish_Obj*)$var, NULL);\n"
  "CFISH_DECREF($var);\n"
  "\n", NULL);
 }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f3eea9b2/runtime/c/src/clownfish.c
--
diff --git a/runtime/c/src/clownfish.c b/runtime/c/src/clownfish.c
index 3566cf9..239a796 100644
--- a/runtime/c/src/clownfish.c
+++ b/runtime/c/src/clownfish.c
@@ -120,8 +120,9 @@ cfish_dec_refcount(void *vself) {
 }
 
 void*
-Obj_To_Host_IMP(Obj *self) {
+Obj_To_Host_IMP(Obj *self, void *vcache) {
 UNUSED_VAR(self);
+UNUSED_VAR(vcache);
 THROW(ERR, "Obj_To_Host not supported in C bindings");
 UNREACHABLE_RETURN(void*);
 }
@@ -264,58 +265,58 @@ cfish_TestUtils_destroy_host_runtime(void *runtime) {
 / To_Host methods **/
 
 void*
-Str_To_Host_IMP(String *self) {
+Str_To_Host_IMP(String *self, void *vcache) {
 Str_To_Host_t super_to_host
 = SUPER_METHOD_PTR(STRING, CFISH_Str_To_Host);
-return super_to_host(self);
+return super_to_host(self, vcache);
 }
 
 void*
-Blob_To_Host_IMP(Blob *self) {
+Blob_To_Host_IMP(Blob *self, void *vcache) {
 Blob_To_Host_t super_to_host
 = SUPER_METHOD_PTR(BLOB, CFISH_Blob_To_Host);
-return super_to_host(self);
+return super_to_host(self, vcache);
 }
 
 void*
-BB_To_Host_IMP(ByteBuf *self) {
+BB_To_Host_IMP(ByteBuf *self, void *vcache) {
 BB_To_Host_t super_to_host
 = 

[03/14] lucy-clownfish git commit: Handle circular refs when converting to Perl

2016-03-19 Thread nwellnhof
Handle circular refs when converting to Perl

Also check for I32 overflow when converting Vector to AV.

Second half of CLOWNFISH-36.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/d9829fb0
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/d9829fb0
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/d9829fb0

Branch: refs/heads/master
Commit: d9829fb0dfdfbedc39463d19e2d1958d9a84593d
Parents: f3eea9b
Author: Nick Wellnhofer 
Authored: Tue Mar 8 11:54:53 2016 +0100
Committer: Nick Wellnhofer 
Committed: Thu Mar 10 14:47:23 2016 +0100

--
 runtime/perl/t/binding/016-vector.t |  5 +-
 runtime/perl/t/binding/017-hash.t   | 15 --
 runtime/perl/xs/XSBind.c| 83 ++--
 3 files changed, 95 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/d9829fb0/runtime/perl/t/binding/016-vector.t
--
diff --git a/runtime/perl/t/binding/016-vector.t 
b/runtime/perl/t/binding/016-vector.t
index 15c3942..7f07a53 100644
--- a/runtime/perl/t/binding/016-vector.t
+++ b/runtime/perl/t/binding/016-vector.t
@@ -16,7 +16,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 3;
+use Test::More tests => 4;
 use Clownfish qw( to_clownfish );
 
 my ( $vector, $twin );
@@ -57,3 +57,6 @@ is(
 'to_clownfish($arrayref) handles deep circular references'
 );
 
+my $roundtripped = $vector->to_perl;
+is_deeply( $roundtripped, $arrayref, 'to_perl handles circular references');
+

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/d9829fb0/runtime/perl/t/binding/017-hash.t
--
diff --git a/runtime/perl/t/binding/017-hash.t 
b/runtime/perl/t/binding/017-hash.t
index b69d8e7..f2aefa7 100644
--- a/runtime/perl/t/binding/017-hash.t
+++ b/runtime/perl/t/binding/017-hash.t
@@ -16,7 +16,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 12;
+use Test::More tests => 14;
 use Clownfish qw( to_clownfish );
 
 my $hash = Clownfish::Hash->new( capacity => 10 );
@@ -53,7 +53,16 @@ $hash = to_clownfish($hashref);
 is( $$hash, ${ $hash->fetch_raw('foo') },
 'to_clownfish($hashref) handles circular references' );
 
-$hash = to_clownfish({ key => $hashref })->fetch_raw('key');
-is( $$hash, ${ $hash->fetch_raw('bar')->fetch_raw(0) },
+my $roundtripped = $hash->to_perl;
+is_deeply( $roundtripped, $hashref, 'to_perl handles circular references' );
+
+$hashref = { key => $hashref };
+$hash = to_clownfish($hashref);
+my $val = $hash->fetch_raw('key');
+is( $$val, ${ $val->fetch_raw('bar')->fetch_raw(0) },
 'to_clownfish($hashref) handles deep circular references' );
 
+$roundtripped = $hash->to_perl;
+is_deeply( $roundtripped, $hashref,
+   'to_perl handles deep circular references' );
+

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/d9829fb0/runtime/perl/xs/XSBind.c
--
diff --git a/runtime/perl/xs/XSBind.c b/runtime/perl/xs/XSBind.c
index 793d5eb..1fdb836 100644
--- a/runtime/perl/xs/XSBind.c
+++ b/runtime/perl/xs/XSBind.c
@@ -987,25 +987,64 @@ CFISH_BB_To_Host_IMP(cfish_ByteBuf *self, void *vcache) {
 void*
 CFISH_Vec_To_Host_IMP(cfish_Vector *self, void *vcache) {
 dTHX;
+cfish_ConversionCache *cache = (cfish_ConversionCache*)vcache;
+cfish_ConversionCache  new_cache;
+
+if (cache) {
+// Lookup Vector in conversion cache.
+if ((cfish_Obj*)self == cache->root_obj) {
+return newRV_inc(cache->root_sv);
+}
+if (cache->seen) {
+void *cached_av = CFISH_PtrHash_Fetch(cache->seen, self);
+if (cached_av) {
+return newRV_inc((SV*)cached_av);
+}
+}
+}
+
 AV *perl_array = newAV();
-uint32_t num_elems = CFISH_Vec_Get_Size(self);
+
+if (!cache) {
+// Set up conversion cache.
+cache = _cache;
+cache->root_obj = (cfish_Obj*)self;
+cache->root_sv  = (SV*)perl_array;
+cache->seen = NULL;
+}
+else {
+if (!cache->seen) {
+// Create PtrHash lazily.
+cache->seen = cfish_PtrHash_new(0);
+}
+CFISH_PtrHash_Store(cache->seen, self, perl_array);
+}
+
+size_t num_elems = CFISH_Vec_Get_Size(self);
 
 // Iterate over array elems.
 if (num_elems) {
+if (num_elems > I32_MAX) {
+THROW(CFISH_ERR, "Vector too large for Perl AV");
+}
 av_fill(perl_array, num_elems - 1);
-for (uint32_t i = 0; i < num_elems; i++) {
+for (size_t i = 0; i < num_elems; i++) {
 cfish_Obj 

[12/14] lucy-clownfish git commit: Replace parcel_id with ParcelSpec pointer

2016-03-19 Thread nwellnhof
Replace parcel_id with ParcelSpec pointer

This makes the check whether a class is in the same parcel thread-safe.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/25f58a6a
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/25f58a6a
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/25f58a6a

Branch: refs/heads/master
Commit: 25f58a6a5267ba8b33bbe00f8a25fa58c490e585
Parents: 8b71db6
Author: Nick Wellnhofer 
Authored: Thu Mar 10 21:19:21 2016 +0100
Committer: Nick Wellnhofer 
Committed: Thu Mar 10 21:49:25 2016 +0100

--
 runtime/core/Clownfish/Class.c   | 33 -
 runtime/core/Clownfish/Class.cfh | 20 ++--
 2 files changed, 14 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/25f58a6a/runtime/core/Clownfish/Class.c
--
diff --git a/runtime/core/Clownfish/Class.c b/runtime/core/Clownfish/Class.c
index 15cde2c..60434d2 100644
--- a/runtime/core/Clownfish/Class.c
+++ b/runtime/core/Clownfish/Class.c
@@ -50,9 +50,6 @@ S_set_name(Class *self, const char *utf8, size_t size);
 static Method*
 S_find_method(Class *self, const char *meth_name);
 
-static int32_t
-S_claim_parcel_id(void);
-
 static LockFreeRegistry *Class_registry;
 cfish_Class_bootstrap_hook1_t cfish_Class_bootstrap_hook1;
 
@@ -64,8 +61,6 @@ Class_bootstrap(const cfish_ParcelSpec *parcel_spec) {
 const InheritedMethSpec  *inherited_specs  = parcel_spec->inherited_specs;
 uint32_t num_classes = parcel_spec->num_classes;
 
-int32_t parcel_id = S_claim_parcel_id();
-
 /* Pass 1:
  * - Allocate memory.
  * - Initialize global Class pointers.
@@ -107,7 +102,7 @@ Class_bootstrap(const cfish_ParcelSpec *parcel_spec) {
  * - Initialize IVARS_OFFSET.
  * - Initialize 'klass' ivar and refcount by calling Init_Obj.
  * - Initialize parent, flags, obj_alloc_size, class_alloc_size.
- * - Assign parcel_id.
+ * - Assign parcel_spec.
  * - Initialize method pointers and offsets.
  */
 uint32_t num_novel  = 0;
@@ -122,7 +117,7 @@ Class_bootstrap(const cfish_ParcelSpec *parcel_spec) {
 if (spec->ivars_offset_ptr != NULL) {
 if (parent) {
 Class *ancestor = parent;
-while (ancestor && ancestor->parcel_id == parcel_id) {
+while (ancestor && ancestor->parcel_spec == parcel_spec) {
 ancestor = ancestor->parent;
 }
 ivars_offset = ancestor ? ancestor->obj_alloc_size : 0;
@@ -137,8 +132,8 @@ Class_bootstrap(const cfish_ParcelSpec *parcel_spec) {
 // values set in the previous pass or by another thread.
 Class_Init_Obj_IMP(CLASS, klass);
 
-klass->parent= parent;
-klass->parcel_id = parcel_id;
+klass->parent  = parent;
+klass->parcel_spec = parcel_spec;
 
 // CLASS->obj_alloc_size must stay at 0.
 if (klass != CLASS) {
@@ -316,7 +311,6 @@ S_simple_subclass(Class *parent, String *name) {
 
 subclass->parent   = parent;
 subclass->flags= parent->flags;
-subclass->parcel_id= parent->parcel_id;
 subclass->obj_alloc_size   = parent->obj_alloc_size;
 subclass->class_alloc_size = parent->class_alloc_size;
 subclass->methods  = (Method**)CALLOCATE(1, sizeof(Method*));
@@ -483,22 +477,3 @@ S_find_method(Class *self, const char *name) {
 return NULL;
 }
 
-static size_t parcel_count;
-
-static int32_t
-S_claim_parcel_id(void) {
-// TODO: use ordinary cas rather than cas_ptr.
-union { size_t num; void *ptr; } old_value;
-union { size_t num; void *ptr; } new_value;
-
-bool succeeded = false;
-do {
-old_value.num = parcel_count;
-new_value.num = old_value.num + 1;
-succeeded = Atomic_cas_ptr((void*volatile*)_count,
-   old_value.ptr, new_value.ptr);
-} while (!succeeded);
-
-return (int32_t)new_value.num;
-}
-

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/25f58a6a/runtime/core/Clownfish/Class.cfh
--
diff --git a/runtime/core/Clownfish/Class.cfh b/runtime/core/Clownfish/Class.cfh
index ab6e2b8..3ac602c 100644
--- a/runtime/core/Clownfish/Class.cfh
+++ b/runtime/core/Clownfish/Class.cfh
@@ -24,16 +24,16 @@ parcel Clownfish;
 
 public final class Clownfish::Class inherits Clownfish::Obj {
 
-Class  *parent;
-String *name;
-String *name_internal;
-uint32_tflags;
-int32_t parcel_id;
-

[09/14] lucy-clownfish git commit: Keep CLASS->obj_alloc_size at 0

2016-03-19 Thread nwellnhof
Keep CLASS->obj_alloc_size at 0

This makes sure that Init_Obj doesn't reset any values when bootstrapping.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/70f2562d
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/70f2562d
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/70f2562d

Branch: refs/heads/master
Commit: 70f2562db5dbd3614b8a6b36f2a1562cdf7f9e05
Parents: 7528af4
Author: Nick Wellnhofer 
Authored: Thu Mar 10 20:48:58 2016 +0100
Committer: Nick Wellnhofer 
Committed: Thu Mar 10 21:49:25 2016 +0100

--
 runtime/core/Clownfish/Class.c | 35 ++---
 runtime/go/clownfish/class_test.go |  4 ++--
 2 files changed, 12 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/70f2562d/runtime/core/Clownfish/Class.c
--
diff --git a/runtime/core/Clownfish/Class.c b/runtime/core/Clownfish/Class.c
index bfa9978..86fe7c1 100644
--- a/runtime/core/Clownfish/Class.c
+++ b/runtime/core/Clownfish/Class.c
@@ -93,14 +93,6 @@ Class_bootstrap(const cfish_ClassSpec *specs, size_t 
num_specs,
 // Needed to calculate size of subclasses.
 klass->class_alloc_size = class_alloc_size;
 
-if (spec->klass == ) {
-// `obj_alloc_size` is used by Init_Obj to zero the object. In the
-// next pass, this method is called to initialize the Class
-// objects. The Class struct is zeroed already, so this isn't
-// crucial, but let's set the correct value here.
-klass->obj_alloc_size = offsetof(Class, vtable);
-}
-
 // Initialize the global pointer to the Class.
 if (!Atomic_cas_ptr((void**)spec->klass, NULL, klass)) {
 // Another thread beat us to it.
@@ -138,26 +130,15 @@ Class_bootstrap(const cfish_ClassSpec *specs, size_t 
num_specs,
 }
 }
 
-// Init_Obj clears all klass ivars, so `class_alloc_size` must be
-// recalculated.
+// CLASS->obj_alloc_size is always 0, so Init_Obj doesn't clear any
+// values set in the previous pass or by another thread.
 Class_Init_Obj_IMP(CLASS, klass);
 
-uint32_t novel_offset = parent
-? parent->class_alloc_size
-: offsetof(Class, vtable);
-uint32_t class_alloc_size = novel_offset
-+ spec->num_novel_meths
-  * sizeof(cfish_method_t);
-
-klass->parent   = parent;
-klass->parcel_id= parcel_id;
-klass->class_alloc_size = class_alloc_size;
+klass->parent= parent;
+klass->parcel_id = parcel_id;
 
-if (klass == CLASS) {
-// Don't account for vtable array.
-klass->obj_alloc_size = offsetof(Class, vtable);
-}
-else {
+// CLASS->obj_alloc_size must stay at 0.
+if (klass != CLASS) {
 klass->obj_alloc_size = ivars_offset + spec->ivars_size;
 }
 if (cfish_Class_bootstrap_hook1 != NULL) {
@@ -195,6 +176,10 @@ Class_bootstrap(const cfish_ClassSpec *specs, size_t 
num_specs,
 Class_Override_IMP(klass, mspec->func, *mspec->offset);
 }
 
+uint32_t novel_offset = parent
+? parent->class_alloc_size
+: offsetof(Class, vtable);
+
 for (size_t i = 0; i < spec->num_novel_meths; ++i) {
 const NovelMethSpec *mspec = _specs[num_novel++];
 *mspec->offset = novel_offset;

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/70f2562d/runtime/go/clownfish/class_test.go
--
diff --git a/runtime/go/clownfish/class_test.go 
b/runtime/go/clownfish/class_test.go
index ebd3a68..b96b1e0 100644
--- a/runtime/go/clownfish/class_test.go
+++ b/runtime/go/clownfish/class_test.go
@@ -36,8 +36,8 @@ func TestClassGetParent(t *testing.T) {
 
 func TestClassGetObjAllocSize(t *testing.T) {
intClass := FetchClass("Clownfish::Integer")
-   classClass := FetchClass("Clownfish::Class")
-   if intClass.GetObjAllocSize() >= classClass.GetObjAllocSize() {
+   objClass := FetchClass("Clownfish::Obj")
+   if intClass.GetObjAllocSize() <= objClass.GetObjAllocSize() {
t.Error("Unexpected result for getObjAllocSize")
}
 }



[07/14] lucy-clownfish git commit: Make bootstrap_parcel thread-safe

2016-03-19 Thread nwellnhof
Make bootstrap_parcel thread-safe

Remove bootstrap_inheritance.

Add bootstrap_internal which invokes Class_bootstrap and parcel_init only
for a single parcel.

Detect inheritance cycles in Class_bootstrap.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/d7c863b9
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/d7c863b9
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/d7c863b9

Branch: refs/heads/master
Commit: d7c863b92dae97fd8a7eea93364941607e4921e1
Parents: ce1fe99
Author: Nick Wellnhofer 
Authored: Thu Mar 10 19:06:53 2016 +0100
Committer: Nick Wellnhofer 
Committed: Thu Mar 10 21:23:57 2016 +0100

--
 compiler/src/CFCBindCore.c | 56 +
 runtime/core/Clownfish/Class.c | 12 +++-
 2 files changed, 24 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/d7c863b9/compiler/src/CFCBindCore.c
--
diff --git a/compiler/src/CFCBindCore.c b/compiler/src/CFCBindCore.c
index e5b23ce..4b2d3c6 100644
--- a/compiler/src/CFCBindCore.c
+++ b/compiler/src/CFCBindCore.c
@@ -362,13 +362,13 @@ S_write_parcel_h(CFCBindCore *self, CFCParcel *parcel) {
 "\n"
 "%s" // Extra definitions.
 "%sVISIBLE void\n"
-"%sbootstrap_inheritance();\n"
+"%sbootstrap_internal(void);\n"
 "\n"
 "%sVISIBLE void\n"
-"%sbootstrap_parcel();\n"
+"%sbootstrap_parcel(void);\n"
 "\n"
 "void\n"
-"%sinit_parcel();\n"
+"%sinit_parcel(void);\n"
 "\n"
 "#ifdef __cplusplus\n"
 "}\n"
@@ -439,30 +439,12 @@ S_write_parcel_c(CFCBindCore *self, CFCParcel *parcel) {
 char *spec_init_func = CFCBindSpecs_init_func_def(specs);
 FREEMEM(ordered);
 
-// Bootstrapping code for prerequisite parcels.
-//
-// bootstrap_inheritance() first calls bootstrap_inheritance() for all
-// parcels from which classes are inherited. Then the Classes of the parcel
-// are initialized. It aborts on recursive invocation.
-//
-// bootstrap_parcel() first calls bootstrap_inheritance() of its own
-// parcel. Then it calls bootstrap_parcel() for all prerequisite parcels.
-// Finally, it calls init_parcel(). Recursive invocation is allowed.
-
-char *inh_bootstrap= CFCUtil_strdup("");
 char *prereq_bootstrap = CFCUtil_strdup("");
-CFCParcel **inh_parcels = CFCParcel_inherited_parcels(parcel);
-for (size_t i = 0; inh_parcels[i]; ++i) {
-const char *inh_prefix = CFCParcel_get_prefix(inh_parcels[i]);
-inh_bootstrap = CFCUtil_cat(inh_bootstrap, "", inh_prefix,
-"bootstrap_inheritance();\n", NULL);
-}
-FREEMEM(inh_parcels);
 CFCParcel **prereq_parcels = CFCParcel_prereq_parcels(parcel);
 for (size_t i = 0; prereq_parcels[i]; ++i) {
 const char *prereq_prefix = CFCParcel_get_prefix(prereq_parcels[i]);
 prereq_bootstrap = CFCUtil_cat(prereq_bootstrap, "", prereq_prefix,
-   "bootstrap_parcel();\n", NULL);
+   "bootstrap_internal();\n", NULL);
 }
 FREEMEM(prereq_parcels);
 
@@ -490,37 +472,26 @@ S_write_parcel_c(CFCBindCore *self, CFCParcel *parcel) {
 "\n"
 "%s" // spec_init_func
 "\n"
-"static int bootstrap_state = 0;\n"
-"\n"
 "void\n"
-"%sbootstrap_inheritance() {\n"
-"if (bootstrap_state == 1) {\n"
-"fprintf(stderr, \"Cycle in class inheritance between\"\n"
-"\" parcels detected.\\n\");\n"
-"abort();\n"
-"}\n"
-"if (bootstrap_state >= 2) { return; }\n"
-"bootstrap_state = 1;\n"
-"%s" // Bootstrap inherited parcels.
+"%sbootstrap_internal() {\n"
+"static int bootstrapped = 0;\n"
+"if (bootstrapped) { return; }\n"
 "S_bootstrap_specs();\n"
-"bootstrap_state = 2;\n"
+"%sinit_parcel();\n"
+"bootstrapped = 1;\n"
 "}\n"
 "\n"
 "void\n"
 "%sbootstrap_parcel() {\n"
-"if (bootstrap_state >= 3) { return; }\n"
-"%sbootstrap_inheritance();\n"
-"bootstrap_state = 3;\n"
-"%s" // Finish bootstrapping of all prerequisite parcels.
-"%sinit_parcel();\n"
+"%s" // Bootstrap prerequisite parcels.
+"%sbootstrap_internal();\n"
 "}\n"
 "\n"
 "%s\n";
 char *file_content
 = CFCUtil_sprintf(pattern, self->c_header, 

[11/14] lucy-clownfish git commit: Introduce struct cfish_ParcelSpec

2016-03-19 Thread nwellnhof
Introduce struct cfish_ParcelSpec

Change Class_bootstrap to take a single pointer to struct
cfish_ParcelSpec.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/8b71db60
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/8b71db60
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/8b71db60

Branch: refs/heads/master
Commit: 8b71db60c361fde4135e7b16b4e018a48bae1d2f
Parents: 70f2562
Author: Nick Wellnhofer 
Authored: Thu Mar 10 21:15:12 2016 +0100
Committer: Nick Wellnhofer 
Committed: Thu Mar 10 21:49:25 2016 +0100

--
 compiler/src/CFCBindSpecs.c  | 24 
 runtime/core/Clownfish/Class.c   | 17 ++---
 runtime/core/Clownfish/Class.cfh |  5 +
 3 files changed, 31 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/8b71db60/compiler/src/CFCBindSpecs.c
--
diff --git a/compiler/src/CFCBindSpecs.c b/compiler/src/CFCBindSpecs.c
index d9aecca..ee10a50 100644
--- a/compiler/src/CFCBindSpecs.c
+++ b/compiler/src/CFCBindSpecs.c
@@ -131,6 +131,14 @@ CFCBindSpecs_get_typedefs() {
 "uint32_t  num_inherited_meths;\n"
 "uint32_t  flags;\n"
 "} cfish_ClassSpec;\n"
+"\n"
+"typedef struct cfish_ParcelSpec {\n"
+"const cfish_ClassSpec  *class_specs;\n"
+"const cfish_NovelMethSpec  *novel_specs;\n"
+"const cfish_OverriddenMethSpec *overridden_specs;\n"
+"const cfish_InheritedMethSpec  *inherited_specs;\n"
+"uint32_t num_classes;\n"
+"} cfish_ParcelSpec;\n"
 "\n";
 }
 
@@ -267,9 +275,18 @@ CFCBindSpecs_defs(CFCBindSpecs *self) {
 "%s"
 "static cfish_ClassSpec class_specs[] = {\n"
 "%s\n"
+"};\n"
+"\n"
+"static const cfish_ParcelSpec parcel_spec = {\n"
+"class_specs,\n"
+"novel_specs,\n"
+"overridden_specs,\n"
+"inherited_specs,\n"
+"%d\n" // num_classes
 "};\n";
 char *defs = CFCUtil_sprintf(pattern, novel_specs, overridden_specs,
- inherited_specs, self->class_specs);
+ inherited_specs, self->class_specs,
+ self->num_specs);
 
 FREEMEM(inherited_specs);
 FREEMEM(overridden_specs);
@@ -284,10 +301,9 @@ CFCBindSpecs_init_func_def(CFCBindSpecs *self) {
 "S_bootstrap_specs() {\n"
 "%s"
 "\n"
-"cfish_Class_bootstrap(class_specs, %d, novel_specs,\n"
-"  overridden_specs, inherited_specs);\n"
+"cfish_Class_bootstrap(_spec);\n"
 "}\n";
-return CFCUtil_sprintf(pattern, self->init_code, self->num_specs);
+return CFCUtil_sprintf(pattern, self->init_code);
 }
 
 static char*

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/8b71db60/runtime/core/Clownfish/Class.c
--
diff --git a/runtime/core/Clownfish/Class.c b/runtime/core/Clownfish/Class.c
index 86fe7c1..15cde2c 100644
--- a/runtime/core/Clownfish/Class.c
+++ b/runtime/core/Clownfish/Class.c
@@ -57,17 +57,20 @@ static LockFreeRegistry *Class_registry;
 cfish_Class_bootstrap_hook1_t cfish_Class_bootstrap_hook1;
 
 void
-Class_bootstrap(const cfish_ClassSpec *specs, size_t num_specs,
-const cfish_NovelMethSpec *novel_specs,
-const cfish_OverriddenMethSpec *overridden_specs,
-const cfish_InheritedMethSpec *inherited_specs) {
+Class_bootstrap(const cfish_ParcelSpec *parcel_spec) {
+const ClassSpec  *specs= parcel_spec->class_specs;
+const NovelMethSpec  *novel_specs  = parcel_spec->novel_specs;
+const OverriddenMethSpec *overridden_specs = parcel_spec->overridden_specs;
+const InheritedMethSpec  *inherited_specs  = parcel_spec->inherited_specs;
+uint32_t num_classes = parcel_spec->num_classes;
+
 int32_t parcel_id = S_claim_parcel_id();
 
 /* Pass 1:
  * - Allocate memory.
  * - Initialize global Class pointers.
  */
-for (size_t i = 0; i < num_specs; ++i) {
+for (uint32_t i = 0; i < num_classes; ++i) {
 const ClassSpec *spec = [i];
 Class *parent = NULL;
 
@@ -110,7 +113,7 @@ Class_bootstrap(const cfish_ClassSpec *specs, size_t 
num_specs,
 uint32_t num_novel  = 0;
 uint32_t num_overridden = 0;
 uint32_t num_inherited  = 0;
-for (size_t i = 0; i < num_specs; ++i) {
+for (uint32_t i = 0; i < num_classes; ++i) {
 const ClassSpec *spec = [i];
 

[02/14] lucy-clownfish git commit: Handle circular refs when converting from Perl

2016-03-19 Thread nwellnhof
Handle circular refs when converting from Perl

First half of CLOWNFISH-36.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/3e0546fa
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/3e0546fa
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/3e0546fa

Branch: refs/heads/master
Commit: 3e0546fabc8a2c3953561e184fc3bc5d2a10a8f1
Parents: 6c8dbb3
Author: Nick Wellnhofer 
Authored: Tue Mar 8 11:54:42 2016 +0100
Committer: Nick Wellnhofer 
Committed: Thu Mar 10 14:29:29 2016 +0100

--
 runtime/perl/t/binding/016-vector.t |  29 ++-
 runtime/perl/t/binding/017-hash.t   |  14 +++-
 runtime/perl/xs/XSBind.c| 128 +++
 3 files changed, 151 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/3e0546fa/runtime/perl/t/binding/016-vector.t
--
diff --git a/runtime/perl/t/binding/016-vector.t 
b/runtime/perl/t/binding/016-vector.t
index ff2e547..15c3942 100644
--- a/runtime/perl/t/binding/016-vector.t
+++ b/runtime/perl/t/binding/016-vector.t
@@ -16,8 +16,8 @@
 use strict;
 use warnings;
 
-use Test::More tests => 1;
-use Clownfish;
+use Test::More tests => 3;
+use Clownfish qw( to_clownfish );
 
 my ( $vector, $twin );
 
@@ -32,3 +32,28 @@ $vector->insert(
 $twin = $vector->clone_raw;
 is_deeply( $twin->to_perl, $vector->to_perl, "clone" );
 
+use Data::Dumper;
+
+my $hashref  = { foo => 'Foo', bar => 'Bar' };
+$hashref->{baz} = [ { circular => [ undef, $hashref ], one => 'One' } ];
+
+my $arrayref = [];
+push( @$arrayref, [] ) for 1..5000;
+push( @$arrayref, $arrayref, { key => $arrayref }, 42, $hashref, 'string' );
+
+$vector = to_clownfish($arrayref);
+is( $$vector, ${ $vector->fetch_raw(5000) },
+'to_clownfish($arrayref) handles circular references' );
+
+my $hash = $vector->fetch_raw(5003);
+is(
+$$hash,
+${
+$hash->fetch_raw('baz')
+ ->fetch_raw(0)
+ ->fetch_raw('circular')
+ ->fetch_raw(1)
+},
+'to_clownfish($arrayref) handles deep circular references'
+);
+

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/3e0546fa/runtime/perl/t/binding/017-hash.t
--
diff --git a/runtime/perl/t/binding/017-hash.t 
b/runtime/perl/t/binding/017-hash.t
index 9b26829..b69d8e7 100644
--- a/runtime/perl/t/binding/017-hash.t
+++ b/runtime/perl/t/binding/017-hash.t
@@ -16,7 +16,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 10;
+use Test::More tests => 12;
 use Clownfish qw( to_clownfish );
 
 my $hash = Clownfish::Hash->new( capacity => 10 );
@@ -45,3 +45,15 @@ my $round_tripped = to_clownfish( \%hash_with_utf8_keys 
)->to_perl;
 is_deeply( $round_tripped, \%hash_with_utf8_keys,
 "Round trip conversion of hash with UTF-8 keys" );
 
+my $hashref = {};
+$hashref->{foo} = $hashref;
+$hashref->{bar} = [ $hashref ];
+
+$hash = to_clownfish($hashref);
+is( $$hash, ${ $hash->fetch_raw('foo') },
+'to_clownfish($hashref) handles circular references' );
+
+$hash = to_clownfish({ key => $hashref })->fetch_raw('key');
+is( $$hash, ${ $hash->fetch_raw('bar')->fetch_raw(0) },
+'to_clownfish($hashref) handles deep circular references' );
+

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/3e0546fa/runtime/perl/xs/XSBind.c
--
diff --git a/runtime/perl/xs/XSBind.c b/runtime/perl/xs/XSBind.c
index 85bd85b..a4f9046 100644
--- a/runtime/perl/xs/XSBind.c
+++ b/runtime/perl/xs/XSBind.c
@@ -30,6 +30,7 @@
 #include "Clownfish/HashIterator.h"
 #include "Clownfish/Method.h"
 #include "Clownfish/Num.h"
+#include "Clownfish/PtrHash.h"
 #include "Clownfish/TestHarness/TestUtils.h"
 #include "Clownfish/Util/Atomic.h"
 #include "Clownfish/Util/StringHelper.h"
@@ -38,19 +39,29 @@
 #define XSBIND_REFCOUNT_FLAG   1
 #define XSBIND_REFCOUNT_SHIFT  1
 
+// Used to remember converted objects in array and hash conversion to
+// handle circular references. The root object and SV are stored separately
+// to allow lazy creation of the seen PtrHash.
+typedef struct {
+cfish_Obj *root_obj;
+SV*root_sv;
+cfish_PtrHash *seen;
+} cfish_ConversionCache;
+
 static bool
 S_maybe_perl_to_cfish(pTHX_ SV *sv, cfish_Class *klass, bool increment,
-  void *allocation, cfish_Obj **obj_ptr);
+  void *allocation, cfish_ConversionCache *cache,
+  cfish_Obj **obj_ptr);
 
 // Convert a Perl hash into a Clownfish Hash.  Caller takes responsibility for
 // a refcount.
 static cfish_Hash*
-S_perl_hash_to_cfish_hash(pTHX_ HV 

lucy-clownfish git commit: Change copyright year in NOTICE

2016-03-12 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/master 1b4313df5 -> f5139fff5


Change copyright year in NOTICE


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/f5139fff
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/f5139fff
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/f5139fff

Branch: refs/heads/master
Commit: f5139fff5f156ef3c3375bb405b8b79fae7b0c23
Parents: 1b4313d
Author: Nick Wellnhofer 
Authored: Sat Mar 12 15:43:13 2016 +0100
Committer: Nick Wellnhofer 
Committed: Sat Mar 12 15:53:17 2016 +0100

--
 NOTICE | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f5139fff/NOTICE
--
diff --git a/NOTICE b/NOTICE
index cff9d4c..28d1506 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Clownfish subproject of Apache Lucy
-Copyright 2010-2014 The Apache Software Foundation
+Copyright 2010-2016 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).



[1/2] lucy git commit: Fix compiler warning

2016-03-12 Thread nwellnhof
Repository: lucy
Updated Branches:
  refs/heads/0.5 29b6f7370 -> 557fdbca6


Fix compiler warning


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/de602e99
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/de602e99
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/de602e99

Branch: refs/heads/0.5
Commit: de602e9991b8ff146366f03d34056148a1abcf84
Parents: 29b6f73
Author: Nick Wellnhofer 
Authored: Sat Mar 12 15:50:35 2016 +0100
Committer: Nick Wellnhofer 
Committed: Sat Mar 12 15:51:01 2016 +0100

--
 core/Lucy/Index/SortWriter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/de602e99/core/Lucy/Index/SortWriter.c
--
diff --git a/core/Lucy/Index/SortWriter.c b/core/Lucy/Index/SortWriter.c
index 4c9ce50..34be6eb 100644
--- a/core/Lucy/Index/SortWriter.c
+++ b/core/Lucy/Index/SortWriter.c
@@ -151,7 +151,7 @@ SortWriter_Add_Inverted_Doc_IMP(SortWriter *self, Inverter 
*inverter,
 // If our SortFieldWriters have collectively passed the memory threshold,
 // flush all of them, then reset the counter which tracks memory
 // consumption.
-if (Counter_Get_Value(ivars->counter) > ivars->mem_thresh) {
+if ((size_t)Counter_Get_Value(ivars->counter) > ivars->mem_thresh) {
 for (uint32_t i = 0; i < Vec_Get_Size(ivars->field_writers); i++) {
 SortFieldWriter *const field_writer
 = (SortFieldWriter*)Vec_Fetch(ivars->field_writers, i);



[1/2] lucy git commit: Fix compiler warning

2016-03-12 Thread nwellnhof
Repository: lucy
Updated Branches:
  refs/heads/master eefbb4085 -> ee5cebea4


Fix compiler warning


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/cb66d5d8
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/cb66d5d8
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/cb66d5d8

Branch: refs/heads/master
Commit: cb66d5d8f0641c84fde2607fe109978fe3562ade
Parents: eefbb40
Author: Nick Wellnhofer 
Authored: Sat Mar 12 15:50:35 2016 +0100
Committer: Nick Wellnhofer 
Committed: Sat Mar 12 15:50:35 2016 +0100

--
 core/Lucy/Index/SortWriter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/cb66d5d8/core/Lucy/Index/SortWriter.c
--
diff --git a/core/Lucy/Index/SortWriter.c b/core/Lucy/Index/SortWriter.c
index 4c9ce50..34be6eb 100644
--- a/core/Lucy/Index/SortWriter.c
+++ b/core/Lucy/Index/SortWriter.c
@@ -151,7 +151,7 @@ SortWriter_Add_Inverted_Doc_IMP(SortWriter *self, Inverter 
*inverter,
 // If our SortFieldWriters have collectively passed the memory threshold,
 // flush all of them, then reset the counter which tracks memory
 // consumption.
-if (Counter_Get_Value(ivars->counter) > ivars->mem_thresh) {
+if ((size_t)Counter_Get_Value(ivars->counter) > ivars->mem_thresh) {
 for (uint32_t i = 0; i < Vec_Get_Size(ivars->field_writers); i++) {
 SortFieldWriter *const field_writer
 = (SortFieldWriter*)Vec_Fetch(ivars->field_writers, i);



[2/2] lucy git commit: Change copyright year in NOTICE

2016-03-12 Thread nwellnhof
Change copyright year in NOTICE


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/557fdbca
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/557fdbca
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/557fdbca

Branch: refs/heads/0.5
Commit: 557fdbca66cb7400f9a7cd1941441b8447ac9c5e
Parents: de602e9
Author: Nick Wellnhofer 
Authored: Sat Mar 12 15:51:33 2016 +0100
Committer: Nick Wellnhofer 
Committed: Sat Mar 12 15:51:33 2016 +0100

--
 NOTICE | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/557fdbca/NOTICE
--
diff --git a/NOTICE b/NOTICE
index 13af725..a1931b4 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Lucy
-Copyright 2010-2014 The Apache Software Foundation
+Copyright 2010-2016 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).



[2/2] lucy git commit: Change copyright year in NOTICE

2016-03-12 Thread nwellnhof
Change copyright year in NOTICE


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/ee5cebea
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/ee5cebea
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/ee5cebea

Branch: refs/heads/master
Commit: ee5cebea40162fb5d57268f3828547a480d407d3
Parents: cb66d5d
Author: Nick Wellnhofer 
Authored: Sat Mar 12 15:51:33 2016 +0100
Committer: Nick Wellnhofer 
Committed: Sat Mar 12 15:52:15 2016 +0100

--
 NOTICE | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/lucy/blob/ee5cebea/NOTICE
--
diff --git a/NOTICE b/NOTICE
index 13af725..a1931b4 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Lucy
-Copyright 2010-2014 The Apache Software Foundation
+Copyright 2010-2016 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).



[1/2] lucy-clownfish git commit: Fix compiler warnings

2016-03-12 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/0.5 05d3caa62 -> c83c71364


Fix compiler warnings


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/4aec071f
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/4aec071f
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/4aec071f

Branch: refs/heads/0.5
Commit: 4aec071f0616e140d4377e78fbe16ab06cc773de
Parents: 05d3caa
Author: Nick Wellnhofer 
Authored: Sat Mar 12 15:39:53 2016 +0100
Committer: Nick Wellnhofer 
Committed: Sat Mar 12 15:42:33 2016 +0100

--
 compiler/common/charmonizer.c| 3 ++-
 compiler/common/charmonizer.main | 3 ++-
 compiler/modules/CommonMark/src/config.h | 5 -
 compiler/src/CFCCallable.c   | 6 --
 compiler/src/CFCPython.c | 7 +++
 5 files changed, 15 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/4aec071f/compiler/common/charmonizer.c
--
diff --git a/compiler/common/charmonizer.c b/compiler/common/charmonizer.c
index 887e57c..87c80d0 100644
--- a/compiler/common/charmonizer.c
+++ b/compiler/common/charmonizer.c
@@ -7998,7 +7998,8 @@ S_add_compiler_flags(struct chaz_CLI *cli) {
 }
 
 chaz_CFlags_append(extra_cflags,
-"-pedantic -Wall -Wextra -Wno-variadic-macros");
+"-pedantic -Wall -Wextra -Wno-variadic-macros"
+" -Wno-overlength-strings");
 if (strcmp(chaz_CLI_strval(cli, "host"), "perl") == 0) {
 chaz_CFlags_append(extra_cflags, "-DPERL_GCC_PEDANTIC");
 }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/4aec071f/compiler/common/charmonizer.main
--
diff --git a/compiler/common/charmonizer.main b/compiler/common/charmonizer.main
index e8058c6..80f161a 100644
--- a/compiler/common/charmonizer.main
+++ b/compiler/common/charmonizer.main
@@ -103,7 +103,8 @@ S_add_compiler_flags(struct chaz_CLI *cli) {
 }
 
 chaz_CFlags_append(extra_cflags,
-"-pedantic -Wall -Wextra -Wno-variadic-macros");
+"-pedantic -Wall -Wextra -Wno-variadic-macros"
+" -Wno-overlength-strings");
 if (strcmp(chaz_CLI_strval(cli, "host"), "perl") == 0) {
 chaz_CFlags_append(extra_cflags, "-DPERL_GCC_PEDANTIC");
 }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/4aec071f/compiler/modules/CommonMark/src/config.h
--
diff --git a/compiler/modules/CommonMark/src/config.h 
b/compiler/modules/CommonMark/src/config.h
index e387e69..97272b2 100644
--- a/compiler/modules/CommonMark/src/config.h
+++ b/compiler/modules/CommonMark/src/config.h
@@ -18,4 +18,7 @@ typedef char bool;
   #define HAVE_C99_SNPRINTF
 #endif
 
-#define inline CHY_INLINE
+#if defined(_MSC_VER) && !defined(__cplusplus)
+  #define inline __inline
+#endif
+

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/4aec071f/compiler/src/CFCCallable.c
--
diff --git a/compiler/src/CFCCallable.c b/compiler/src/CFCCallable.c
index d421366..ccb3931 100644
--- a/compiler/src/CFCCallable.c
+++ b/compiler/src/CFCCallable.c
@@ -31,12 +31,6 @@
 #include "CFCDocuComment.h"
 #include "CFCUtil.h"
 
-static const CFCMeta CFCCALLABLE_META = {
-"Clownfish::CFC::Model::Callable",
-sizeof(CFCCallable),
-(CFCBase_destroy_t)CFCCallable_destroy
-};
-
 CFCCallable*
 CFCCallable_init(CFCCallable *self, const char *exposure, const char *name,
  CFCType *return_type, CFCParamList *param_list,

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/4aec071f/compiler/src/CFCPython.c
--
diff --git a/compiler/src/CFCPython.c b/compiler/src/CFCPython.c
index d108b69..3c60682 100644
--- a/compiler/src/CFCPython.c
+++ b/compiler/src/CFCPython.c
@@ -112,6 +112,8 @@ S_write_hostdefs(CFCPython *self) {
 
 static char*
 S_gen_callbacks(CFCPython *self, CFCParcel *parcel, CFCClass **ordered) {
+CHY_UNUSED_VAR(self);
+CHY_UNUSED_VAR(parcel);
 char *callbacks  = CFCUtil_strdup("");
 
 // Generate implementation files containing callback definitions.
@@ -364,6 +366,8 @@ S_gen_callbacks(CFCPython *self, CFCParcel *parcel, 
CFCClass **ordered) {
 
 static char*
 S_gen_type_linkups(CFCPython *self, CFCParcel *parcel, CFCClass **ordered) {
+CHY_UNUSED_VAR(self);
+CHY_UNUSED_VAR(parcel);
 char *handles  = CFCUtil_strdup("");
 char *py_types = CFCUtil_strdup("");
 int 

[2/2] lucy-clownfish git commit: Change copyright year in NOTICE

2016-03-12 Thread nwellnhof
Change copyright year in NOTICE


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/c83c7136
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/c83c7136
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/c83c7136

Branch: refs/heads/0.5
Commit: c83c7136405716739d92cec3843da9d9fb7558a3
Parents: 4aec071
Author: Nick Wellnhofer 
Authored: Sat Mar 12 15:43:13 2016 +0100
Committer: Nick Wellnhofer 
Committed: Sat Mar 12 15:43:13 2016 +0100

--
 NOTICE | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/c83c7136/NOTICE
--
diff --git a/NOTICE b/NOTICE
index cff9d4c..28d1506 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Clownfish subproject of Apache Lucy
-Copyright 2010-2014 The Apache Software Foundation
+Copyright 2010-2016 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).



lucy-clownfish git commit: Fix compiler warnings

2016-03-12 Thread nwellnhof
Repository: lucy-clownfish
Updated Branches:
  refs/heads/master 20eef8fc3 -> 1b4313df5


Fix compiler warnings


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/1b4313df
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/1b4313df
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/1b4313df

Branch: refs/heads/master
Commit: 1b4313df5d4104c2d7a5af5bd1e566a3efeb6b7b
Parents: 20eef8f
Author: Nick Wellnhofer 
Authored: Sat Mar 12 15:39:53 2016 +0100
Committer: Nick Wellnhofer 
Committed: Sat Mar 12 15:39:53 2016 +0100

--
 compiler/common/charmonizer.c| 3 ++-
 compiler/common/charmonizer.main | 3 ++-
 compiler/modules/CommonMark/src/config.h | 5 -
 compiler/src/CFCCallable.c   | 6 --
 compiler/src/CFCPython.c | 7 +++
 5 files changed, 15 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/1b4313df/compiler/common/charmonizer.c
--
diff --git a/compiler/common/charmonizer.c b/compiler/common/charmonizer.c
index 887e57c..87c80d0 100644
--- a/compiler/common/charmonizer.c
+++ b/compiler/common/charmonizer.c
@@ -7998,7 +7998,8 @@ S_add_compiler_flags(struct chaz_CLI *cli) {
 }
 
 chaz_CFlags_append(extra_cflags,
-"-pedantic -Wall -Wextra -Wno-variadic-macros");
+"-pedantic -Wall -Wextra -Wno-variadic-macros"
+" -Wno-overlength-strings");
 if (strcmp(chaz_CLI_strval(cli, "host"), "perl") == 0) {
 chaz_CFlags_append(extra_cflags, "-DPERL_GCC_PEDANTIC");
 }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/1b4313df/compiler/common/charmonizer.main
--
diff --git a/compiler/common/charmonizer.main b/compiler/common/charmonizer.main
index e8058c6..80f161a 100644
--- a/compiler/common/charmonizer.main
+++ b/compiler/common/charmonizer.main
@@ -103,7 +103,8 @@ S_add_compiler_flags(struct chaz_CLI *cli) {
 }
 
 chaz_CFlags_append(extra_cflags,
-"-pedantic -Wall -Wextra -Wno-variadic-macros");
+"-pedantic -Wall -Wextra -Wno-variadic-macros"
+" -Wno-overlength-strings");
 if (strcmp(chaz_CLI_strval(cli, "host"), "perl") == 0) {
 chaz_CFlags_append(extra_cflags, "-DPERL_GCC_PEDANTIC");
 }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/1b4313df/compiler/modules/CommonMark/src/config.h
--
diff --git a/compiler/modules/CommonMark/src/config.h 
b/compiler/modules/CommonMark/src/config.h
index e387e69..97272b2 100644
--- a/compiler/modules/CommonMark/src/config.h
+++ b/compiler/modules/CommonMark/src/config.h
@@ -18,4 +18,7 @@ typedef char bool;
   #define HAVE_C99_SNPRINTF
 #endif
 
-#define inline CHY_INLINE
+#if defined(_MSC_VER) && !defined(__cplusplus)
+  #define inline __inline
+#endif
+

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/1b4313df/compiler/src/CFCCallable.c
--
diff --git a/compiler/src/CFCCallable.c b/compiler/src/CFCCallable.c
index d421366..ccb3931 100644
--- a/compiler/src/CFCCallable.c
+++ b/compiler/src/CFCCallable.c
@@ -31,12 +31,6 @@
 #include "CFCDocuComment.h"
 #include "CFCUtil.h"
 
-static const CFCMeta CFCCALLABLE_META = {
-"Clownfish::CFC::Model::Callable",
-sizeof(CFCCallable),
-(CFCBase_destroy_t)CFCCallable_destroy
-};
-
 CFCCallable*
 CFCCallable_init(CFCCallable *self, const char *exposure, const char *name,
  CFCType *return_type, CFCParamList *param_list,

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/1b4313df/compiler/src/CFCPython.c
--
diff --git a/compiler/src/CFCPython.c b/compiler/src/CFCPython.c
index d108b69..3c60682 100644
--- a/compiler/src/CFCPython.c
+++ b/compiler/src/CFCPython.c
@@ -112,6 +112,8 @@ S_write_hostdefs(CFCPython *self) {
 
 static char*
 S_gen_callbacks(CFCPython *self, CFCParcel *parcel, CFCClass **ordered) {
+CHY_UNUSED_VAR(self);
+CHY_UNUSED_VAR(parcel);
 char *callbacks  = CFCUtil_strdup("");
 
 // Generate implementation files containing callback definitions.
@@ -364,6 +366,8 @@ S_gen_callbacks(CFCPython *self, CFCParcel *parcel, 
CFCClass **ordered) {
 
 static char*
 S_gen_type_linkups(CFCPython *self, CFCParcel *parcel, CFCClass **ordered) {
+CHY_UNUSED_VAR(self);
+CHY_UNUSED_VAR(parcel);
 char *handles  = CFCUtil_strdup("");
 char *py_types = CFCUtil_strdup("");
 int 

[07/12] lucy-clownfish git commit: Move CFC test files into "common" directory

2016-03-10 Thread nwellnhof
Move CFC test files into "common" directory


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/82ad2895
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/82ad2895
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/82ad2895

Branch: refs/heads/master
Commit: 82ad28953d9d1e2e66fded8ef8ffab85be18f124
Parents: df605b5
Author: Nick Wellnhofer 
Authored: Sat Mar 5 19:46:12 2016 +0100
Committer: Nick Wellnhofer 
Committed: Sat Mar 5 19:52:04 2016 +0100

--
 compiler/c/t/cfbase/Animal.cfh  |  21 
 compiler/c/t/cfbase/Animal.cfp  |   4 -
 compiler/c/t/cfbase/Animal/Dog.cfh  |  28 -
 compiler/c/t/cfbase/Animal/Util.cfh |  23 
 compiler/c/t/cfclash/bar/Bar.cfh|  25 
 compiler/c/t/cfclash/bar/Bar.cfp|   4 -
 compiler/c/t/cfclash/bar/Baz.cfh|  25 
 compiler/c/t/cfclash/class/Animal/DogClash.cfh  |  28 -
 compiler/c/t/cfclash/class/AnimalExtension.cfp  |   5 -
 compiler/c/t/cfclash/file/Animal/Dog.cfh|  28 -
 compiler/c/t/cfclash/foo/Foo.cfh|  25 
 compiler/c/t/cfclash/foo/Foo.cfp|   4 -
 compiler/c/t/cfext/Animal/Rottweiler.cfh|  31 -
 compiler/c/t/cfext/AnimalExtension.cfp  |   8 --
 compiler/c/t/test_cfc.c |   2 +-
 compiler/common/test/cfbase/Animal.cfh  |  21 
 compiler/common/test/cfbase/Animal.cfp  |   4 +
 compiler/common/test/cfbase/Animal/Dog.cfh  |  28 +
 compiler/common/test/cfbase/Animal/Util.cfh |  23 
 compiler/common/test/cfclash/bar/Bar.cfh|  25 
 compiler/common/test/cfclash/bar/Bar.cfp|   4 +
 compiler/common/test/cfclash/bar/Baz.cfh|  25 
 .../test/cfclash/class/Animal/DogClash.cfh  |  28 +
 .../test/cfclash/class/AnimalExtension.cfp  |   5 +
 .../common/test/cfclash/file/Animal/Dog.cfh |  28 +
 compiler/common/test/cfclash/foo/Foo.cfh|  25 
 compiler/common/test/cfclash/foo/Foo.cfp|   4 +
 .../common/test/cfext/Animal/Rottweiler.cfh |  31 +
 compiler/common/test/cfext/AnimalExtension.cfp  |   8 ++
 compiler/perl/buildlib/Clownfish/CFC/Build.pm   |  21 ++--
 .../buildlib/Clownfish/CFC/Test/TestUtils.pm|  44 +++
 compiler/perl/lib/Clownfish/CFC.xs  |   5 +-
 compiler/perl/t/403-parcel.t|   3 +-
 compiler/perl/t/500-hierarchy.t |   7 +-
 compiler/perl/t/501-include_dir.t   |   7 +-
 compiler/perl/t/cfbase/Animal.cfh   |  21 
 compiler/perl/t/cfbase/Animal.cfp   |   4 -
 compiler/perl/t/cfbase/Animal/Dog.cfh   |  28 -
 compiler/perl/t/cfbase/Animal/Util.cfh  |  23 
 compiler/perl/t/cfext/Animal/Rottweiler.cfh |  31 -
 compiler/perl/t/cfext/AnimalExtension.cfp   |   8 --
 compiler/perl/t/core/403-parcel.t   |   6 +-
 compiler/perl/t/core/500-hierarchy.t|   6 +-
 compiler/src/CFCTest.c  |  20 ++-
 compiler/src/CFCTest.h  |   9 +-
 compiler/src/CFCTestHierarchy.c | 121 +++
 compiler/src/CFCTestParcel.c|   3 +-
 47 files changed, 433 insertions(+), 454 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/82ad2895/compiler/c/t/cfbase/Animal.cfh
--
diff --git a/compiler/c/t/cfbase/Animal.cfh b/compiler/c/t/cfbase/Animal.cfh
deleted file mode 100644
index 46130b7..000
--- a/compiler/c/t/cfbase/Animal.cfh
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-parcel Animal;
-
-class Clownfish::Obj { }
-
-abstract class Animal { }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/82ad2895/compiler/c/t/cfbase/Animal.cfp

[03/12] lucy-clownfish git commit: Support catching CFC exceptions from C

2016-03-10 Thread nwellnhof
Support catching CFC exceptions from C

Needed to fix CLOWNFISH-14.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/5d0a3efe
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/5d0a3efe
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/5d0a3efe

Branch: refs/heads/master
Commit: 5d0a3efefc68ae1ea81564a0184d70273db75623
Parents: 65387c4
Author: Nick Wellnhofer 
Authored: Fri Mar 4 17:58:28 2016 +0100
Committer: Nick Wellnhofer 
Committed: Sat Mar 5 17:51:27 2016 +0100

--
 compiler/src/CFCUtil.c | 71 +
 compiler/src/CFCUtil.h | 23 +++
 2 files changed, 88 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/5d0a3efe/compiler/src/CFCUtil.c
--
diff --git a/compiler/src/CFCUtil.c b/compiler/src/CFCUtil.c
index da546af..a2a0993 100644
--- a/compiler/src/CFCUtil.c
+++ b/compiler/src/CFCUtil.c
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 // For mkdir.
 #ifdef CHY_HAS_DIRECT_H
@@ -36,6 +37,9 @@
 
 #include "CFCUtil.h"
 
+static char*thrown_error;
+static jmp_buf *current_env;
+
 void
 CFCUtil_null_check(const void *arg, const char *name, const char *file,
int line) {
@@ -594,6 +598,21 @@ CFCUtil_closedir(void *dirhandle, const char *dir) {
 
 /***/
 
+jmp_buf*
+CFCUtil_try_start(jmp_buf *env) {
+jmp_buf *prev_env = current_env;
+current_env = env;
+return prev_env;
+}
+
+char*
+CFCUtil_try_end(jmp_buf *prev_env) {
+current_env = prev_env;
+char *error = thrown_error;
+thrown_error = NULL;
+return error;
+}
+
 #ifdef CFCPERL
 
 #include "EXTERN.h"
@@ -605,8 +624,27 @@ void
 CFCUtil_die(const char* format, ...) {
 va_list args;
 va_start(args, format);
-vcroak(format, );
-va_end(args);
+
+if (current_env) {
+thrown_error = CFCUtil_vsprintf(format, args);
+va_end(args);
+longjmp(*current_env, 1);
+}
+else {
+vcroak(format, );
+va_end(args);
+}
+}
+
+void
+CFCUtil_rethrow(char *error) {
+if (current_env) {
+thrown_error = error;
+longjmp(*current_env, 1);
+}
+else {
+croak("%s", error);
+}
 }
 
 void
@@ -623,10 +661,31 @@ void
 CFCUtil_die(const char* format, ...) {
 va_list args;
 va_start(args, format);
-vfprintf(stderr, format, args);
-va_end(args);
-fprintf(stderr, "\n");
-exit(1);
+
+if (current_env) {
+thrown_error = CFCUtil_vsprintf(format, args);
+va_end(args);
+longjmp(*current_env, 1);
+}
+else {
+vfprintf(stderr, format, args);
+va_end(args);
+fprintf(stderr, "\n");
+abort();
+}
+}
+
+void
+CFCUtil_rethrow(char *error) {
+if (current_env) {
+thrown_error = error;
+longjmp(*current_env, 1);
+}
+else {
+fprintf(stderr, "%s\n", error);
+FREEMEM(error);
+abort();
+}
 }
 
 void

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/5d0a3efe/compiler/src/CFCUtil.h
--
diff --git a/compiler/src/CFCUtil.h b/compiler/src/CFCUtil.h
index 3e06b03..73286ef 100644
--- a/compiler/src/CFCUtil.h
+++ b/compiler/src/CFCUtil.h
@@ -29,6 +29,18 @@ extern "C" {
 
 #include 
 #include 
+#include 
+
+#define CFCUTIL_TRY   \
+do {  \
+jmp_buf env;  \
+jmp_buf *prev_env = CFCUtil_try_start();  \
+if (!setjmp(env))
+
+#define CFCUTIL_CATCH(error)  \
+error = CFCUtil_try_end(prev_env);\
+} while (0)
+
 
 /** Create an inner Perl object with a refcount of 1.  For use in actual
  * Perl-space, it is necessary to wrap this inner object in an RV.
@@ -223,11 +235,22 @@ CFCUtil_free_string_array(char **strings);
 void
 CFCUtil_die(const char *format, ...);
 
+/* Rethrow an error.
+ */
+void
+CFCUtil_rethrow(char *error);
+
 /* Print an error message to stderr.
  */
 void
 CFCUtil_warn(const char *format, ...);
 
+jmp_buf*
+CFCUtil_try_start(jmp_buf *env);
+
+char*
+CFCUtil_try_end(jmp_buf *prev_env);
+
 #ifdef __cplusplus
 }
 #endif



[08/12] lucy-clownfish git commit: Add check for va_copy

2016-03-10 Thread nwellnhof
Add check for va_copy


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/25e6ff33
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/25e6ff33
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/25e6ff33

Branch: refs/heads/master
Commit: 25e6ff33d3df646d1bf5adc887b8bd5cd6f59023
Parents: 82ad289
Author: Nick Wellnhofer 
Authored: Sat Mar 5 19:54:54 2016 +0100
Committer: Nick Wellnhofer 
Committed: Sat Mar 5 19:54:54 2016 +0100

--
 compiler/src/CFCUtil.c | 15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/25e6ff33/compiler/src/CFCUtil.c
--
diff --git a/compiler/src/CFCUtil.c b/compiler/src/CFCUtil.c
index a2a0993..7470c04 100644
--- a/compiler/src/CFCUtil.c
+++ b/compiler/src/CFCUtil.c
@@ -30,6 +30,17 @@
   #include 
 #endif
 
+#if !defined(CHY_HAS_C99_SNPRINTF) && !defined(CHY_HAS__SCPRINTF)
+  #error "snprintf or replacement not available."
+#endif
+
+/* va_copy is not part of C89. Assume that simple assignment works if it
+ * isn't defined.
+ */
+#ifndef va_copy
+  #define va_copy(dst, src) ((dst) = (src))
+#endif
+
 #ifndef true
 #define true 1
 #define false 0
@@ -74,10 +85,6 @@ CFCUtil_sprintf(const char *fmt, ...) {
 return string;
 }
 
-#if !defined(CHY_HAS_C99_SNPRINTF) && !defined(CHY_HAS__SCPRINTF)
-  #error "snprintf or replacement not available."
-#endif
-
 char*
 CFCUtil_vsprintf(const char *fmt, va_list args) {
 va_list args_copy;



[11/12] lucy-clownfish git commit: Don't allow inheriting from final class

2016-03-10 Thread nwellnhof
Don't allow inheriting from final class


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/64142fb2
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/64142fb2
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/64142fb2

Branch: refs/heads/master
Commit: 64142fb25442fd7c0fb0b1281f441a1125873f31
Parents: 00efad1
Author: Nick Wellnhofer 
Authored: Sat Mar 5 20:26:27 2016 +0100
Committer: Nick Wellnhofer 
Committed: Thu Mar 10 14:22:10 2016 +0100

--
 compiler/src/CFCClass.c |  3 +++
 compiler/src/CFCTestClass.c | 21 -
 2 files changed, 23 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/64142fb2/compiler/src/CFCClass.c
--
diff --git a/compiler/src/CFCClass.c b/compiler/src/CFCClass.c
index 5e1f795..56edce5 100644
--- a/compiler/src/CFCClass.c
+++ b/compiler/src/CFCClass.c
@@ -474,6 +474,9 @@ CFCClass_add_child(CFCClass *self, CFCClass *child) {
 if (self->tree_grown) {
 CFCUtil_die("Can't call add_child after grow_tree");
 }
+if (self->is_final) {
+CFCUtil_die("Can't inherit from final class %s", self->name);
+}
 if (self->is_inert) {
 CFCUtil_die("Can't inherit from inert class %s", self->name);
 }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/64142fb2/compiler/src/CFCTestClass.c
--
diff --git a/compiler/src/CFCTestClass.c b/compiler/src/CFCTestClass.c
index 8acb300..9fa182c 100644
--- a/compiler/src/CFCTestClass.c
+++ b/compiler/src/CFCTestClass.c
@@ -44,7 +44,7 @@ S_has_symbol(CFCSymbol **symbols, const char *name);
 
 const CFCTestBatch CFCTEST_BATCH_CLASS = {
 "Clownfish::CFC::Model::Class",
-96,
+97,
 S_run_tests
 };
 
@@ -211,6 +211,25 @@ S_run_tests(CFCTest *test) {
 
 CFCClass_add_child(foo, foo_jr);
 CFCClass_add_child(foo_jr, final_foo);
+
+{
+CFCClass *bar
+= CFCClass_create(neato, NULL, "Foo::FooJr::FinalFoo::Bar", NULL,
+  NULL, NULL, "Foo::FooJr::FinalFoo", false, false,
+  false);
+char *error;
+
+CFCUTIL_TRY {
+CFCClass_add_child(final_foo, bar);
+}
+CFCUTIL_CATCH(error);
+OK(test, error && strstr(error, "final class"),
+   "Can't add_child to final class");
+
+FREEMEM(error);
+CFCBase_decref((CFCBase*)bar);
+}
+
 CFCClass_grow_tree(foo);
 
 {



[09/12] lucy-clownfish git commit: Merge branch 'catch-cfc-exceptions'

2016-03-10 Thread nwellnhof
Merge branch 'catch-cfc-exceptions'


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/b21ec10f
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/b21ec10f
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/b21ec10f

Branch: refs/heads/master
Commit: b21ec10f15a9e453e869983294340c31100270d1
Parents: faefec2 25e6ff3
Author: Nick Wellnhofer 
Authored: Thu Mar 10 14:21:18 2016 +0100
Committer: Nick Wellnhofer 
Committed: Thu Mar 10 14:21:18 2016 +0100

--
 compiler/c/t/cfbase/Animal.cfh  |  21 ---
 compiler/c/t/cfbase/Animal.cfp  |   4 -
 compiler/c/t/cfbase/Animal/Dog.cfh  |  28 ---
 compiler/c/t/cfbase/Animal/Util.cfh |  23 ---
 compiler/c/t/cfext/Animal/Rottweiler.cfh|  31 
 compiler/c/t/cfext/AnimalExtension.cfp  |   8 -
 compiler/c/t/test_cfc.c |   2 +-
 compiler/common/test/cfbase/Animal.cfh  |  21 +++
 compiler/common/test/cfbase/Animal.cfp  |   4 +
 compiler/common/test/cfbase/Animal/Dog.cfh  |  28 +++
 compiler/common/test/cfbase/Animal/Util.cfh |  23 +++
 compiler/common/test/cfclash/bar/Bar.cfh|  25 +++
 compiler/common/test/cfclash/bar/Bar.cfp|   4 +
 compiler/common/test/cfclash/bar/Baz.cfh|  25 +++
 .../test/cfclash/class/Animal/DogClash.cfh  |  28 +++
 .../test/cfclash/class/AnimalExtension.cfp  |   5 +
 .../common/test/cfclash/file/Animal/Dog.cfh |  28 +++
 compiler/common/test/cfclash/foo/Foo.cfh|  25 +++
 compiler/common/test/cfclash/foo/Foo.cfp|   4 +
 .../common/test/cfext/Animal/Rottweiler.cfh |  31 
 compiler/common/test/cfext/AnimalExtension.cfp  |   8 +
 compiler/perl/buildlib/Clownfish/CFC/Build.pm   |  21 ++-
 .../buildlib/Clownfish/CFC/Test/TestUtils.pm|  44 +
 compiler/perl/lib/Clownfish/CFC.xs  |   5 +-
 compiler/perl/t/401-class.t |  45 +++--
 compiler/perl/t/403-parcel.t|   3 +-
 compiler/perl/t/500-hierarchy.t |   7 +-
 compiler/perl/t/501-include_dir.t   |   7 +-
 compiler/perl/t/502-clash.t | 108 ---
 compiler/perl/t/cfbase/Animal.cfh   |  21 ---
 compiler/perl/t/cfbase/Animal.cfp   |   4 -
 compiler/perl/t/cfbase/Animal/Dog.cfh   |  28 ---
 compiler/perl/t/cfbase/Animal/Util.cfh  |  23 ---
 compiler/perl/t/cfclash/bar/Bar.cfh |  25 ---
 compiler/perl/t/cfclash/bar/Bar.cfp |   4 -
 compiler/perl/t/cfclash/bar/Baz.cfh |  25 ---
 .../perl/t/cfclash/class/Animal/DogClash.cfh|  28 ---
 .../perl/t/cfclash/class/AnimalExtension.cfp|   5 -
 compiler/perl/t/cfclash/file/Animal/Dog.cfh |  28 ---
 compiler/perl/t/cfclash/foo/Foo.cfh |  25 ---
 compiler/perl/t/cfclash/foo/Foo.cfp |   4 -
 compiler/perl/t/cfext/Animal/Rottweiler.cfh |  31 
 compiler/perl/t/cfext/AnimalExtension.cfp   |   8 -
 compiler/perl/t/core/403-parcel.t   |   6 +-
 compiler/perl/t/core/500-hierarchy.t|   6 +-
 compiler/src/CFCCBlock.c|   5 +-
 compiler/src/CFCClass.c |  14 +-
 compiler/src/CFCTest.c  |  57 +-
 compiler/src/CFCTest.h  |  12 +-
 compiler/src/CFCTestCBlock.c|  19 +-
 compiler/src/CFCTestClass.c | 105 ++-
 compiler/src/CFCTestFunction.c  |  30 +++-
 compiler/src/CFCTestHierarchy.c | 180 +++
 compiler/src/CFCTestMethod.c|  67 ++-
 compiler/src/CFCTestParcel.c|  90 --
 compiler/src/CFCTestSymbol.c|  29 ++-
 compiler/src/CFCTestType.c  |  59 +-
 compiler/src/CFCTestVariable.c  |  32 +++-
 compiler/src/CFCUtil.c  | 124 +
 compiler/src/CFCUtil.h  |  27 +++
 compiler/src/CFCVariable.c  |   5 +-
 61 files changed, 1109 insertions(+), 633 deletions(-)
--




<    1   2   3   4   5   6   7   8   9   10   >