You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2014/07/20 20:56:06 UTC
[1/7] git commit: Change var name to `klass` for C++ compat.
Repository: lucy-clownfish
Updated Branches:
refs/heads/master aeabd17af -> 6f2a0a193
Change var name to `klass` for C++ compat.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/9b1c2266
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/9b1c2266
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/9b1c2266
Branch: refs/heads/master
Commit: 9b1c2266916afdd45ade690049d3f634d3c3655d
Parents: 61dd4b8
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Sat Jul 19 00:20:26 2014 +0100
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Sun Jul 20 19:54:03 2014 +0100
----------------------------------------------------------------------
runtime/core/Clownfish/Obj.cfh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/9b1c2266/runtime/core/Clownfish/Obj.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Obj.cfh b/runtime/core/Clownfish/Obj.cfh
index 669accf..91e981d 100644
--- a/runtime/core/Clownfish/Obj.cfh
+++ b/runtime/core/Clownfish/Obj.cfh
@@ -156,9 +156,9 @@ public class Clownfish::Obj {
__C__
static CFISH_INLINE void
-cfish_Obj_super_destroy(cfish_Obj *self, cfish_Class *class) {
+cfish_Obj_super_destroy(cfish_Obj *self, cfish_Class *klass) {
CFISH_Obj_Destroy_t super_destroy
- = CFISH_SUPER_METHOD_PTR(class, CFISH_Obj_Destroy);
+ = CFISH_SUPER_METHOD_PTR(klass, CFISH_Obj_Destroy);
super_destroy(self);
}
[7/7] git commit: Fix mixed decs and code in custom XS.
Posted by ma...@apache.org.
Fix mixed decs and code in custom XS.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/6f2a0a19
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/6f2a0a19
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/6f2a0a19
Branch: refs/heads/master
Commit: 6f2a0a193a5ce0d9b9a4173b7a0a0b64bd485f51
Parents: 7511243
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Sun Jul 20 19:50:33 2014 +0100
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Sun Jul 20 19:54:49 2014 +0100
----------------------------------------------------------------------
runtime/perl/buildlib/Clownfish/Build/Binding.pm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/6f2a0a19/runtime/perl/buildlib/Clownfish/Build/Binding.pm
----------------------------------------------------------------------
diff --git a/runtime/perl/buildlib/Clownfish/Build/Binding.pm b/runtime/perl/buildlib/Clownfish/Build/Binding.pm
index 01f87f8..f249aed 100644
--- a/runtime/perl/buildlib/Clownfish/Build/Binding.pm
+++ b/runtime/perl/buildlib/Clownfish/Build/Binding.pm
@@ -569,12 +569,12 @@ fetch_class(unused_sv, class_name_sv)
SV *class_name_sv;
CODE:
{
- CFISH_UNUSED_VAR(unused_sv);
STRLEN size;
char *ptr = SvPVutf8(class_name_sv, size);
cfish_StackString *class_name = CFISH_SSTR_WRAP_UTF8(ptr, size);
cfish_Class *klass
= cfish_Class_fetch_class((cfish_String*)class_name);
+ CFISH_UNUSED_VAR(unused_sv);
RETVAL = klass ? (SV*)CFISH_Class_To_Host(klass) : &PL_sv_undef;
}
OUTPUT: RETVAL
@@ -584,9 +584,9 @@ singleton(unused_sv, ...)
SV *unused_sv;
CODE:
{
- CFISH_UNUSED_VAR(unused_sv);
cfish_String *class_name = NULL;
cfish_Class *parent = NULL;
+ cfish_Class *singleton = NULL;
bool args_ok
= XSBind_allot_params(&(ST(0)), 1, items,
ALLOT_OBJ(&class_name, "class_name", 10, true,
@@ -594,10 +594,11 @@ CODE:
ALLOT_OBJ(&parent, "parent", 6, false,
CFISH_CLASS, NULL),
NULL);
+ CFISH_UNUSED_VAR(unused_sv);
if (!args_ok) {
CFISH_RETHROW(CFISH_INCREF(cfish_Err_get_error()));
}
- cfish_Class *singleton = cfish_Class_singleton(class_name, parent);
+ singleton = cfish_Class_singleton(class_name, parent);
RETVAL = (SV*)CFISH_Class_To_Host(singleton);
}
OUTPUT: RETVAL
[4/7] git commit: Force some bool values to true/false.
Posted by ma...@apache.org.
Force some bool values to true/false.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/8211411f
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/8211411f
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/8211411f
Branch: refs/heads/master
Commit: 8211411feea35dbb5c0cba0c19799f9da00c025e
Parents: 133fb92
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Sun Jul 20 01:49:14 2014 +0100
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Sun Jul 20 19:54:48 2014 +0100
----------------------------------------------------------------------
compiler/src/CFCPerlMethod.c | 7 ++++++-
runtime/perl/xs/XSBind.h | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/8211411f/compiler/src/CFCPerlMethod.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerlMethod.c b/compiler/src/CFCPerlMethod.c
index dd2a5ca..8027cb0 100644
--- a/compiler/src/CFCPerlMethod.c
+++ b/compiler/src/CFCPerlMethod.c
@@ -657,7 +657,12 @@ S_primitive_callback_def(CFCMethod *method, const char *callback_start,
char callback_func[50];
if (CFCType_is_integer(return_type)) {
- strcpy(callback_func, "S_finish_callback_i64");
+ if (strcmp(ret_type_str, "bool") == 0) {
+ strcpy(callback_func, "!!S_finish_callback_i64");
+ }
+ else {
+ strcpy(callback_func, "S_finish_callback_i64");
+ }
}
else if (CFCType_is_floating(return_type)) {
strcpy(callback_func, "S_finish_callback_f64");
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/8211411f/runtime/perl/xs/XSBind.h
----------------------------------------------------------------------
diff --git a/runtime/perl/xs/XSBind.h b/runtime/perl/xs/XSBind.h
index 73b5ebb..22189f9 100644
--- a/runtime/perl/xs/XSBind.h
+++ b/runtime/perl/xs/XSBind.h
@@ -55,7 +55,7 @@ static CFISH_INLINE bool
cfish_XSBind_sv_defined(SV *sv) {
if (!sv || !SvANY(sv)) { return false; }
if (SvGMAGICAL(sv)) { mg_get(sv); }
- return SvOK(sv);
+ return !!SvOK(sv);
}
/** If the SV contains a Clownfish object which passes an "isa" test against the
[2/7] git commit: Add .obj files to .gitignore.
Posted by ma...@apache.org.
Add .obj files to .gitignore.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/61dd4b8c
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/61dd4b8c
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/61dd4b8c
Branch: refs/heads/master
Commit: 61dd4b8c165580e0963f23d62b2cfdda9b8b120d
Parents: aeabd17
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Sat Jul 19 00:13:10 2014 +0100
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Sun Jul 20 19:54:03 2014 +0100
----------------------------------------------------------------------
.gitignore | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/61dd4b8c/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 5e3a3a7..2d9ea87 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*.o
+*.obj
*.dSYM
*.gcda
*.gcno
[3/7] git commit: Search all of @INC for library files
Posted by ma...@apache.org.
Search all of @INC for library files
Needed to make the Lucy build work on Windows if Clownfish is
in a non-standard location.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/ab39208e
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/ab39208e
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/ab39208e
Branch: refs/heads/master
Commit: ab39208e6c06121c0678878ffd5acc2a39ae55bd
Parents: 8211411
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Jul 20 16:59:41 2014 +0200
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Sun Jul 20 19:54:48 2014 +0100
----------------------------------------------------------------------
compiler/perl/lib/Clownfish/CFC/Perl/Build.pm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/ab39208e/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
----------------------------------------------------------------------
diff --git a/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm b/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
index 1b6c04f..dc1d285 100644
--- a/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
+++ b/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
@@ -144,10 +144,9 @@ sub cf_linker_flags {
# Link against import library on MSVC
my $ext = $Config{cc} =~ /^cl\b/ ? 'lib' : $dlext;
- for my $location ( qw( site vendor ) ) {
- my $install_dir = $Config{"install${location}arch"};
+ for my $dir (@INC) {
my $lib_file = catfile(
- $install_dir, 'auto', @module_parts, "$class_name.$ext",
+ $dir, 'auto', @module_parts, "$class_name.$ext",
);
return ( $lib_file ) if -f $lib_file;
}
[5/7] git commit: Define parcel privacy macros before including
XSBind.h
Posted by ma...@apache.org.
Define parcel privacy macros before including XSBind.h
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/133fb925
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/133fb925
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/133fb925
Branch: refs/heads/master
Commit: 133fb925c22e693fc08ae3c3a3c1393d2a75b7b8
Parents: 9b1c226
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Jul 19 18:05:24 2014 +0200
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Sun Jul 20 19:54:48 2014 +0100
----------------------------------------------------------------------
compiler/src/CFCPerl.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/133fb925/compiler/src/CFCPerl.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerl.c b/compiler/src/CFCPerl.c
index 14534fe..7290762 100644
--- a/compiler/src/CFCPerl.c
+++ b/compiler/src/CFCPerl.c
@@ -358,9 +358,6 @@ S_xs_file_contents(CFCPerl *self, const char *generated_xs,
const char pattern[] =
"%s"
"\n"
- "#include \"XSBind.h\"\n"
- "#include \"boot.h\"\n"
- "\n"
"%s\n"
"\n"
"MODULE = %s PACKAGE = %s\n"
@@ -412,6 +409,10 @@ CFCPerl_write_bindings(CFCPerl *self) {
}
generated_xs = CFCUtil_cat(generated_xs, "\n", NULL);
+ // Include XSBind.h and boot.h.
+ generated_xs = CFCUtil_cat(generated_xs, "#include \"XSBind.h\"\n", NULL);
+ generated_xs = CFCUtil_cat(generated_xs, "#include \"boot.h\"\n", NULL);
+
// Pound-includes for generated headers.
for (size_t i = 0; ordered[i] != NULL; i++) {
CFCClass *klass = ordered[i];
[6/7] git commit: Windows batch file to setup dev environment
Posted by ma...@apache.org.
Windows batch file to setup dev environment
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/7511243e
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/7511243e
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/7511243e
Branch: refs/heads/master
Commit: 7511243e5de1c7fb34c0da4dad8f669e3686e179
Parents: ab39208
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Jul 20 17:00:51 2014 +0200
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Sun Jul 20 19:54:49 2014 +0100
----------------------------------------------------------------------
devel/bin/setup_env.bat | 71 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/7511243e/devel/bin/setup_env.bat
----------------------------------------------------------------------
diff --git a/devel/bin/setup_env.bat b/devel/bin/setup_env.bat
new file mode 100644
index 0000000..8357073
--- /dev/null
+++ b/devel/bin/setup_env.bat
@@ -0,0 +1,71 @@
+@echo off
+
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+setlocal EnableExtensions EnableDelayedExpansion
+
+set base_dir=%~dp0\..\..
+call :normalize "%base_dir%"
+set base_dir=%retval%
+set runtime_dir=%base_dir%\runtime
+set compiler_dir=%base_dir%\compiler
+
+call :add_to_path "%PATH%" "%compiler_dir%\c"
+set PATH=%retval%
+call :add_to_path "%PATH%" "%runtime_dir%\c"
+set PATH=%retval%
+call :add_to_path "%INCLUDE%" "%runtime_dir%\perl\xs"
+set INCLUDE=%retval%
+call :add_to_path "%LIB%" "%runtime_dir%\c"
+set LIB=%retval%
+call :add_to_path "%CLOWNFISH_INCLUDE%" "%runtime_dir%\core"
+set CLOWNFISH_INCLUDE=%retval%
+call :add_to_path "%PERL5LIB%" "%compiler_dir%\perl\blib\arch"
+set PERL5LIB=%retval%
+call :add_to_path "%PERL5LIB%" "%compiler_dir%\perl\blib\lib"
+set PERL5LIB=%retval%
+call :add_to_path "%PERL5LIB%" "%runtime_dir%\perl\blib\arch"
+set PERL5LIB=%retval%
+call :add_to_path "%PERL5LIB%" "%runtime_dir%\perl\blib\lib"
+set PERL5LIB=%retval%
+
+endlocal & (
+ set "PATH=%PATH%"
+ set "INCLUDE=%INCLUDE%"
+ set "LIB=%LIB%"
+ set "CLOWNFISH_INCLUDE=%CLOWNFISH_INCLUDE%"
+ set "PERL5LIB=%PERL5LIB%"
+)
+
+exit /b
+
+:normalize
+set retval=%~f1
+goto :eof
+
+:add_to_path
+set _path=%~1
+set _dir=%~2
+if "%_path%" == "" (
+ set "retval=%_dir%"
+ goto :eof
+)
+if "!_path:%_dir%=!" == "%_path%" (
+ set "retval=%_path%;%_dir%"
+ goto :eof
+)
+set retval=%_path%
+goto :eof