You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2013/07/21 15:35:17 UTC

[lucy-commits] [08/10] git commit: refs/heads/charmonizer-decoupling - Switch to CFISH_UNUSED_VAR in custom XS

Switch to CFISH_UNUSED_VAR in custom XS

The following commit will change XSBind.h to not include charmony.h
anymore. Some custom XS code used Charmony macros, relying on charmony.h
being available. It's still OK for custom XS code to use Charmony, but
we'd need a way to add custom #includes to the generated XS. Since we
only use CHY_UNUSED_VAR, simply switch to the new CFISH version instead.

Since UNUSED_VAR and UNREACHABLE_RETURN are not platform-dependent, I'm
tempted to remove them from Charmony and always use the CFISH versions.


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

Branch: refs/heads/charmonizer-decoupling
Commit: 9c3a2a1573d92409515e70387d3e5dd941592024
Parents: df58e35
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Jul 21 14:11:12 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Jul 21 15:31:34 2013 +0200

----------------------------------------------------------------------
 clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm | 6 +++---
 perl/buildlib/Lucy/Build/Binding/Document.pm               | 2 +-
 perl/buildlib/Lucy/Build/Binding/Index.pm                  | 4 ++--
 perl/buildlib/Lucy/Build/Binding/Misc.pm                   | 4 ++--
 perl/buildlib/Lucy/Build/Binding/Util.pm                   | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/9c3a2a15/clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm b/clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm
index 66fa118..4948de6 100644
--- a/clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm
+++ b/clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm
@@ -192,7 +192,7 @@ CODE:
     char *ptr = SvPVutf8(sv, size);
     cfish_ViewCharBuf *self
         = cfish_ViewCB_new_from_trusted_utf8(ptr, size);
-    CHY_UNUSED_VAR(unused);
+    CFISH_UNUSED_VAR(unused);
     RETVAL = CFISH_OBJ_TO_SV_NOINC(self);
 }
 OUTPUT: RETVAL
@@ -605,7 +605,7 @@ fetch_vtable(unused_sv, class_name_sv)
     SV *class_name_sv;
 CODE:
 {
-    CHY_UNUSED_VAR(unused_sv);
+    CFISH_UNUSED_VAR(unused_sv);
     STRLEN size;
     char *ptr = SvPVutf8(class_name_sv, size);
     cfish_ZombieCharBuf *class_name = CFISH_ZCB_WRAP_STR(ptr, size);
@@ -620,7 +620,7 @@ singleton(unused_sv, ...)
     SV *unused_sv;
 CODE:
 {
-    CHY_UNUSED_VAR(unused_sv);
+    CFISH_UNUSED_VAR(unused_sv);
     cfish_CharBuf *class_name = NULL;
     cfish_VTable  *parent     = NULL;
     bool args_ok

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c3a2a15/perl/buildlib/Lucy/Build/Binding/Document.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build/Binding/Document.pm b/perl/buildlib/Lucy/Build/Binding/Document.pm
index 94706b4..3ff51fd 100644
--- a/perl/buildlib/Lucy/Build/Binding/Document.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Document.pm
@@ -89,7 +89,7 @@ SV*
 get_fields(self, ...)
     lucy_Doc *self;
 CODE:
-    CHY_UNUSED_VAR(items);
+    CFISH_UNUSED_VAR(items);
     RETVAL = newRV_inc((SV*)Lucy_Doc_Get_Fields(self));
 OUTPUT: RETVAL
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c3a2a15/perl/buildlib/Lucy/Build/Binding/Index.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build/Binding/Index.pm b/perl/buildlib/Lucy/Build/Binding/Index.pm
index 71913b1..18146e7 100644
--- a/perl/buildlib/Lucy/Build/Binding/Index.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Index.pm
@@ -550,14 +550,14 @@ MODULE = Lucy  PACKAGE = Lucy::Index::Indexer
 int32_t
 CREATE(...)
 CODE:
-    CHY_UNUSED_VAR(items);
+    CFISH_UNUSED_VAR(items);
     RETVAL = lucy_Indexer_CREATE;
 OUTPUT: RETVAL
 
 int32_t
 TRUNCATE(...)
 CODE:
-    CHY_UNUSED_VAR(items);
+    CFISH_UNUSED_VAR(items);
     RETVAL = lucy_Indexer_TRUNCATE;
 OUTPUT: RETVAL
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c3a2a15/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 19036d9..e7e17d1 100644
--- a/perl/buildlib/Lucy/Build/Binding/Misc.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Misc.pm
@@ -99,7 +99,7 @@ STORABLE_freeze(self, ...)
     cfish_Obj *self;
 PPCODE:
 {
-    CHY_UNUSED_VAR(self);
+    CFISH_UNUSED_VAR(self);
     if (items < 2 || !SvTRUE(ST(1))) {
         SV *retval;
         cfish_ByteBuf *serialized_bb;
@@ -155,7 +155,7 @@ PPCODE:
     cfish_Obj *self = Cfish_VTable_Foster_Obj(vtable, blank_obj);
     cfish_Obj *deserialized = lucy_Freezer_deserialize(self, instream);
 
-    CHY_UNUSED_VAR(cloning);
+    CFISH_UNUSED_VAR(cloning);
     CFISH_DECREF(contents);
     CFISH_DECREF(ram_file);
     CFISH_DECREF(file_handle);

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c3a2a15/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 a64c58b..db8e3d3 100644
--- a/perl/buildlib/Lucy/Build/Binding/Util.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Util.pm
@@ -126,7 +126,7 @@ void
 track_globals(...)
 PPCODE:
 {
-    CHY_UNUSED_VAR(items);
+    CFISH_UNUSED_VAR(items);
     LUCY_IFDEF_DEBUG(lucy_Debug_num_globals++;);
 }