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/22 22:13:34 UTC
[lucy-commits] [5/6] git commit: refs/heads/charmonizer-decoupling - Switch to
CFISH_SIZEOF macros in XSBind.h
Switch to CFISH_SIZEOF macros in XSBind.h
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/e513f8f9
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/e513f8f9
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/e513f8f9
Branch: refs/heads/charmonizer-decoupling
Commit: e513f8f96fb66540216edcff55d70d66b1668542
Parents: 23ebeaa
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Mon Jul 22 21:45:11 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Mon Jul 22 22:08:29 2013 +0200
----------------------------------------------------------------------
clownfish/runtime/perl/xs/XSBind.c | 1 +
clownfish/runtime/perl/xs/XSBind.h | 23 ++++++++++++++---------
perl/xs/Lucy/Document/Doc.c | 1 +
3 files changed, 16 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/e513f8f9/clownfish/runtime/perl/xs/XSBind.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/xs/XSBind.c b/clownfish/runtime/perl/xs/XSBind.c
index 092b5e9..ac75d6b 100644
--- a/clownfish/runtime/perl/xs/XSBind.c
+++ b/clownfish/runtime/perl/xs/XSBind.c
@@ -18,6 +18,7 @@
#define C_CFISH_VTABLE
#define C_CFISH_LOCKFREEREGISTRY
#define NEED_newRV_noinc
+#include "charmony.h"
#include "XSBind.h"
#include "Clownfish/LockFreeRegistry.h"
#include "Clownfish/Util/StringHelper.h"
http://git-wip-us.apache.org/repos/asf/lucy/blob/e513f8f9/clownfish/runtime/perl/xs/XSBind.h
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/xs/XSBind.h b/clownfish/runtime/perl/xs/XSBind.h
index c5a5453..2b207cd 100644
--- a/clownfish/runtime/perl/xs/XSBind.h
+++ b/clownfish/runtime/perl/xs/XSBind.h
@@ -20,7 +20,6 @@
#ifndef H_CFISH_XSBIND
#define H_CFISH_XSBIND 1
-#include "charmony.h"
#include "Clownfish/Obj.h"
#include "Clownfish/ByteBuf.h"
#include "Clownfish/CharBuf.h"
@@ -226,34 +225,40 @@ cfish_XSBind_allot_params(SV** stack, int32_t start,
#define XSBIND_WANT_OBJ 0xC
#define XSBIND_WANT_SV 0xD
-#if (CHY_SIZEOF_CHAR == 1)
+#if (CFISH_SIZEOF_CHAR == 1)
#define XSBIND_WANT_CHAR XSBIND_WANT_I8
#else
#error "Can't build unless sizeof(char) == 1"
#endif
-#if (CHY_SIZEOF_SHORT == 2)
+#if (CFISH_SIZEOF_SHORT == 2)
#define XSBIND_WANT_SHORT XSBIND_WANT_I16
#else
#error "Can't build unless sizeof(short) == 2"
#endif
-#if (CHY_SIZEOF_INT == 4)
+#if (CFISH_SIZEOF_INT == 4)
#define XSBIND_WANT_INT XSBIND_WANT_I32
-#else // sizeof(int) == 8
+#elif (CFISH_SIZEOF_INT == 8)
#define XSBIND_WANT_INT XSBIND_WANT_I64
+#else
+ #error "Can't build unless sizeof(int) == 4 or sizeof(int) == 8"
#endif
-#if (CHY_SIZEOF_LONG == 4)
+#if (CFISH_SIZEOF_LONG == 4)
#define XSBIND_WANT_LONG XSBIND_WANT_I32
-#else // sizeof(long) == 8
+#elif (CFISH_SIZEOF_LONG == 8)
#define XSBIND_WANT_LONG XSBIND_WANT_I64
+#else
+ #error "Can't build unless sizeof(long) == 4 or sizeof(long) == 8"
#endif
-#if (CHY_SIZEOF_SIZE_T == 4)
+#if (CFISH_SIZEOF_SIZE_T == 4)
#define XSBIND_WANT_SIZE_T XSBIND_WANT_U32
-#else // sizeof(long) == 8
+#elif (CFISH_SIZEOF_SIZE_T == 8)
#define XSBIND_WANT_SIZE_T XSBIND_WANT_U64
+#else
+ #error "Can't build unless sizeof(size_t) == 4 or sizeof(size_t) == 8"
#endif
#define XSBIND_ALLOT_I8(ptr, key, keylen, required) \
http://git-wip-us.apache.org/repos/asf/lucy/blob/e513f8f9/perl/xs/Lucy/Document/Doc.c
----------------------------------------------------------------------
diff --git a/perl/xs/Lucy/Document/Doc.c b/perl/xs/Lucy/Document/Doc.c
index 220a7bf..6dd58b4 100644
--- a/perl/xs/Lucy/Document/Doc.c
+++ b/perl/xs/Lucy/Document/Doc.c
@@ -15,6 +15,7 @@
*/
#define C_LUCY_DOC
+#include "charmony.h"
#include "XSBind.h"
#include "Lucy/Document/Doc.h"
#include "Lucy/Store/InStream.h"