[1/2] lucy git commit: Fix wrong vararg type in LFLock_init
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
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
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-0.5.0-rc3/apa
[lucy-clownfish] Git Push Summary
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/
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.
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, &end); -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.
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, + arg_assigns, body); FREEMEM(arg_a