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 2014/07/09 20:27:01 UTC
[1/2] git commit: Cease using CHY short names
Repository: lucy-clownfish
Updated Branches:
refs/heads/charmony-fixes [created] 37adfe427
Cease using CHY short names
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/37adfe42
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/37adfe42
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/37adfe42
Branch: refs/heads/charmony-fixes
Commit: 37adfe427cfade9c91b9985d59f69d4c51b32424
Parents: cea231a
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Jul 9 18:27:15 2014 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Jul 9 20:25:15 2014 +0200
----------------------------------------------------------------------
runtime/core/Clownfish/Num.c | 3 +--
runtime/core/Clownfish/Obj.c | 9 ++++-----
runtime/core/Clownfish/Test/TestCharBuf.c | 5 ++---
runtime/core/Clownfish/Test/TestObj.c | 3 +--
runtime/core/Clownfish/Test/Util/TestMemory.c | 7 +++----
runtime/core/Clownfish/TestHarness/TestUtils.c | 3 +--
6 files changed, 12 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/37adfe42/runtime/core/Clownfish/Num.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Num.c b/runtime/core/Clownfish/Num.c
index 24a6de7..774e578 100644
--- a/runtime/core/Clownfish/Num.c
+++ b/runtime/core/Clownfish/Num.c
@@ -23,7 +23,6 @@
#define C_CFISH_FLOAT64
#define C_CFISH_BOOLNUM
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
#include "charmony.h"
@@ -369,7 +368,7 @@ Bool_Clone_IMP(BoolNum *self) {
int32_t
Bool_Hash_Sum_IMP(BoolNum *self) {
- int64_t hash_sum = PTR_TO_I64(self) + self->value;
+ int64_t hash_sum = CHY_PTR_TO_I64(self) + self->value;
return (int32_t)hash_sum;
}
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/37adfe42/runtime/core/Clownfish/Obj.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Obj.c b/runtime/core/Clownfish/Obj.c
index db6e44b..69320fd 100644
--- a/runtime/core/Clownfish/Obj.c
+++ b/runtime/core/Clownfish/Obj.c
@@ -17,7 +17,6 @@
#define C_CFISH_OBJ
#define C_CFISH_CLASS
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
#include "charmony.h"
@@ -45,7 +44,7 @@ Obj_Destroy_IMP(Obj *self) {
int32_t
Obj_Hash_Sum_IMP(Obj *self) {
- int64_t hash_sum = PTR_TO_I64(self);
+ int64_t hash_sum = CHY_PTR_TO_I64(self);
return (int32_t)hash_sum;
}
@@ -70,10 +69,10 @@ Obj_Equals_IMP(Obj *self, Obj *other) {
String*
Obj_To_String_IMP(Obj *self) {
-#if (SIZEOF_PTR == 4)
+#if (CHY_SIZEOF_PTR == 4)
return Str_newf("%o@0x%x32", Obj_Get_Class_Name(self), self);
-#elif (SIZEOF_PTR == 8)
- int64_t iaddress = PTR_TO_I64(self);
+#elif (CHY_SIZEOF_PTR == 8)
+ int64_t iaddress = CHY_PTR_TO_I64(self);
uint64_t address = (uint64_t)iaddress;
uint32_t address_hi = address >> 32;
uint32_t address_lo = address & 0xFFFFFFFF;
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/37adfe42/runtime/core/Clownfish/Test/TestCharBuf.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Test/TestCharBuf.c b/runtime/core/Clownfish/Test/TestCharBuf.c
index 4070ae7..d6d4d50 100644
--- a/runtime/core/Clownfish/Test/TestCharBuf.c
+++ b/runtime/core/Clownfish/Test/TestCharBuf.c
@@ -17,7 +17,6 @@
#include <string.h>
#include <stdio.h>
-#define CHY_USE_SHORT_NAMES
#define CFISH_USE_SHORT_NAMES
#define TESTCFISH_USE_SHORT_NAMES
@@ -265,9 +264,9 @@ test_vcatf_x32(TestBatchRunner *runner) {
char buf[64];
unsigned long num = INT32_MAX;
CharBuf *got = S_get_cb("foo ");
-#if (SIZEOF_LONG == 4)
+#if (CHY_SIZEOF_LONG == 4)
sprintf(buf, "foo bar %.8lx baz", num);
-#elif (SIZEOF_INT == 4)
+#elif (CHY_SIZEOF_INT == 4)
sprintf(buf, "foo bar %.8x baz", (unsigned)num);
#endif
wanted = Str_new_from_trusted_utf8(buf, strlen(buf));
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/37adfe42/runtime/core/Clownfish/Test/TestObj.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Test/TestObj.c b/runtime/core/Clownfish/Test/TestObj.c
index 7b4a955..1f6a470 100644
--- a/runtime/core/Clownfish/Test/TestObj.c
+++ b/runtime/core/Clownfish/Test/TestObj.c
@@ -16,7 +16,6 @@
#include <stdio.h>
-#define CHY_USE_SHORT_NAMES
#define CFISH_USE_SHORT_NAMES
#define TESTCFISH_USE_SHORT_NAMES
@@ -89,7 +88,7 @@ test_Equals(TestBatchRunner *runner) {
static void
test_Hash_Sum(TestBatchRunner *runner) {
Obj *testobj = S_new_testobj();
- int64_t address64 = PTR_TO_I64(testobj);
+ int64_t address64 = CHY_PTR_TO_I64(testobj);
int32_t address32 = (int32_t)address64;
TEST_TRUE(runner, (Obj_Hash_Sum(testobj) == address32),
"Hash_Sum uses memory address");
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/37adfe42/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 0f1278f..9bab8d4 100644
--- a/runtime/core/Clownfish/Test/Util/TestMemory.c
+++ b/runtime/core/Clownfish/Test/Util/TestMemory.c
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-#define CHY_USE_SHORT_NAMES
#define CFISH_USE_SHORT_NAMES
#define TESTCFISH_USE_SHORT_NAMES
@@ -49,8 +48,8 @@ test_oversize__growth_rate(TestBatchRunner *runner) {
}
if (size > 0) {
growth_count += 1;
- double growth_rate = U64_TO_DOUBLE(next_size) /
- U64_TO_DOUBLE(size);
+ double growth_rate = CHY_U64_TO_DOUBLE(next_size) /
+ CHY_U64_TO_DOUBLE(size);
double sum = growth_rate + (growth_count - 1) * average_growth_rate;
average_growth_rate = sum / growth_count;
if (average_growth_rate < 1.1) {
@@ -71,7 +70,7 @@ test_oversize__growth_rate(TestBatchRunner *runner) {
for (int minimum = 1; minimum < 8; minimum++) {
uint64_t next_size = Memory_oversize(minimum, sizeof(void*));
- double growth_rate = U64_TO_DOUBLE(next_size) / (double)minimum;
+ double growth_rate = CHY_U64_TO_DOUBLE(next_size) / (double)minimum;
TEST_TRUE(runner, growth_rate > 1.2,
"Growth rate is higher for smaller arrays (%d, %.3f)", minimum,
growth_rate);
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/37adfe42/runtime/core/Clownfish/TestHarness/TestUtils.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/TestHarness/TestUtils.c b/runtime/core/Clownfish/TestHarness/TestUtils.c
index 3bf4d12..a9614ed 100644
--- a/runtime/core/Clownfish/TestHarness/TestUtils.c
+++ b/runtime/core/Clownfish/TestHarness/TestUtils.c
@@ -17,7 +17,6 @@
#include <stdlib.h>
#include <string.h>
-#define CHY_USE_SHORT_NAMES
#define CFISH_USE_SHORT_NAMES
#include "charmony.h"
@@ -65,7 +64,7 @@ TestUtils_random_f64s(double *buf, size_t count) {
double *f64s = buf ? buf : (double*)CALLOCATE(count, sizeof(double));
for (size_t i = 0; i < count; i++) {
uint64_t num = TestUtils_random_u64();
- f64s[i] = U64_TO_DOUBLE(num) / UINT64_MAX;
+ f64s[i] = CHY_U64_TO_DOUBLE(num) / UINT64_MAX;
}
return f64s;
}
[2/2] git commit: Switch from CHY_UNUSED_VAR to CFISH_UNUSED_VAR
Posted by nw...@apache.org.
Switch from CHY_UNUSED_VAR to CFISH_UNUSED_VAR
Also define an unprefixed version of CFISH_UNUSED_VAR if
CFISH_USE_SHORT_NAMES is in use.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/cea231ae
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/cea231ae
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/cea231ae
Branch: refs/heads/charmony-fixes
Commit: cea231aeb837c2cc2b3034ddcc9509820a4e6ab1
Parents: ee29c9a
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Jul 9 18:21:59 2014 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Jul 9 20:25:15 2014 +0200
----------------------------------------------------------------------
compiler/common/charmonizer.c | 18 ++++++++++++++++--
compiler/src/CFCBindCore.c | 2 ++
runtime/c/src/Clownfish/Class.c | 1 -
runtime/c/src/Clownfish/Err.c | 1 -
runtime/c/src/Clownfish/LockFreeRegistry.c | 1 -
runtime/c/src/Clownfish/Obj.c | 1 -
runtime/common/charmonizer.c | 20 ++++++++++++++++----
runtime/common/charmonizer.main | 2 --
runtime/core/Clownfish/ByteBuf.c | 1 -
runtime/core/Clownfish/CharBuf.c | 1 -
runtime/core/Clownfish/Class.c | 3 ---
runtime/core/Clownfish/Err.c | 1 -
runtime/core/Clownfish/Hash.c | 5 +----
runtime/core/Clownfish/LockFreeRegistry.c | 1 -
runtime/core/Clownfish/Method.c | 3 ---
runtime/core/Clownfish/String.c | 3 ---
.../core/Clownfish/Test/TestLockFreeRegistry.c | 3 ---
runtime/core/Clownfish/Test/TestString.c | 3 ---
runtime/core/Clownfish/Test/TestVArray.c | 2 --
.../core/Clownfish/TestHarness/TestFormatter.c | 3 ---
runtime/core/Clownfish/TestHarness/TestSuite.c | 3 ---
.../Clownfish/TestHarness/TestSuiteRunner.c | 1 -
runtime/core/Clownfish/Util/Memory.c | 1 -
runtime/core/Clownfish/Util/NumberUtils.c | 1 -
runtime/core/Clownfish/Util/SortUtils.c | 1 -
runtime/core/Clownfish/Util/StringHelper.c | 3 ---
runtime/core/Clownfish/VArray.c | 3 ---
runtime/perl/xs/XSBind.c | 4 ++--
28 files changed, 37 insertions(+), 55 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/compiler/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/compiler/common/charmonizer.c b/compiler/common/charmonizer.c
index 2231d08..a76ca8a 100644
--- a/compiler/common/charmonizer.c
+++ b/compiler/common/charmonizer.c
@@ -89,6 +89,8 @@ chaz_SharedLib_export_filename(chaz_SharedLib *lib);
#ifndef H_CHAZ_CFLAGS
#define H_CHAZ_CFLAGS
+/* #include "Charmonizer/Core/SharedLibrary.h" */
+
#define CHAZ_CFLAGS_STYLE_POSIX 1
#define CHAZ_CFLAGS_STYLE_GNU 2
#define CHAZ_CFLAGS_STYLE_MSVC 3
@@ -490,7 +492,7 @@ chaz_HeadCheck_contains_member(const char *struct_name, const char *member,
#define H_CHAZ_MAKE
/* #include "Charmonizer/Core/CFlags.h" */
-/* #include "Charmonizer/Core/SharedLib.h" */
+/* #include "Charmonizer/Core/SharedLibrary.h" */
typedef struct chaz_MakeFile chaz_MakeFile;
typedef struct chaz_MakeVar chaz_MakeVar;
@@ -1537,7 +1539,7 @@ void chaz_VariadicMacros_run(void);
#line 17 "src/Charmonizer/Core/SharedLibrary.c"
#include <string.h>
#include <stdlib.h>
-/* #include "Charmonizer/Core/SharedLib.h" */
+/* #include "Charmonizer/Core/SharedLibrary.h" */
/* #include "Charmonizer/Core/Compiler.h" */
/* #include "Charmonizer/Core/Util.h" */
/* #include "Charmonizer/Core/OperatingSystem.h" */
@@ -1661,6 +1663,7 @@ S_get_prefix() {
#include <string.h>
#include <stdlib.h>
/* #include "Charmonizer/Core/CFlags.h" */
+/* #include "Charmonizer/Core/Compiler.h" */
/* #include "Charmonizer/Core/Util.h" */
/* #include "Charmonizer/Core/OperatingSystem.h" */
/* #include "Charmonizer/Core/SharedLibrary.h" */
@@ -3696,6 +3699,7 @@ chaz_HeadCheck_maybe_add_to_cache(const char *header_name, int exists) {
#line 17 "src/Charmonizer/Core/Make.c"
#include <ctype.h>
+#include <stdlib.h>
#include <string.h>
/* #include "Charmonizer/Core/Make.h" */
/* #include "Charmonizer/Core/Compiler.h" */
@@ -4686,6 +4690,7 @@ chaz_OS_rmdir(const char *filepath) {
#include <stdlib.h>
#include <string.h>
/* #include "Charmonizer/Core/Util.h" */
+/* #include "Charmonizer/Core/OperatingSystem.h" */
/* Global verbosity setting. */
int chaz_Util_verbosity = 1;
@@ -4894,6 +4899,7 @@ chaz_Util_can_open_file(const char *file_path) {
/* #include "Charmonizer/Core/ConfWriterRuby.h" */
/* #include "Charmonizer/Core/Util.h" */
/* #include "Charmonizer/Core/Compiler.h" */
+/* #include "Charmonizer/Core/Make.h" */
/* #include "Charmonizer/Core/OperatingSystem.h" */
int
@@ -5146,6 +5152,8 @@ chaz_Booleans_run(void) {
#line 17 "src/Charmonizer/Probe/BuildEnv.c"
/* #include "Charmonizer/Core/HeaderChecker.h" */
+/* #include "Charmonizer/Core/CFlags.h" */
+/* #include "Charmonizer/Core/Compiler.h" */
/* #include "Charmonizer/Core/ConfWriter.h" */
/* #include "Charmonizer/Probe/BuildEnv.h" */
@@ -5361,6 +5369,8 @@ chaz_DirManip_run(void) {
#line 17 "src/Charmonizer/Probe/Floats.c"
/* #include "Charmonizer/Core/HeaderChecker.h" */
+/* #include "Charmonizer/Core/CFlags.h" */
+/* #include "Charmonizer/Core/Compiler.h" */
/* #include "Charmonizer/Core/ConfWriter.h" */
/* #include "Charmonizer/Core/Util.h" */
/* #include "Charmonizer/Probe/Floats.h" */
@@ -6716,6 +6726,7 @@ chaz_Memory_probe_alloca(void) {
#line 17 "src/Charmonizer/Probe/RegularExpressions.c"
/* #include "Charmonizer/Core/HeaderChecker.h" */
+/* #include "Charmonizer/Core/Compiler.h" */
/* #include "Charmonizer/Core/ConfWriter.h" */
/* #include "Charmonizer/Probe/RegularExpressions.h" */
@@ -6764,6 +6775,8 @@ chaz_RegularExpressions_run(void) {
/* #include "Charmonizer/Core/ConfWriter.h" */
/* #include "Charmonizer/Probe/Strings.h" */
+#include <stdlib.h>
+
/* Check for C99-compatible snprintf and possible replacements.
*/
static void
@@ -6936,6 +6949,7 @@ chaz_UnusedVars_run(void) {
/* #include "Charmonizer/Probe/VariadicMacros.h" */
#include <string.h>
#include <stdio.h>
+#include <stdlib.h>
/* Code for verifying ISO-style variadic macros. */
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/compiler/src/CFCBindCore.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCBindCore.c b/compiler/src/CFCBindCore.c
index 58493d0..774b1a3 100644
--- a/compiler/src/CFCBindCore.c
+++ b/compiler/src/CFCBindCore.c
@@ -264,6 +264,8 @@ S_write_parcel_h(CFCBindCore *self, CFCParcel *parcel) {
"} cfish_ClassSpec;\n"
"\n"
"#ifdef CFISH_USE_SHORT_NAMES\n"
+ " #define UNUSED_VAR CFISH_UNUSED_VAR\n"
+ " #define UNREACHABLE_RETURN CFISH_UNREACHABLE_RETURN\n"
" #define METHOD_PTR CFISH_METHOD_PTR\n"
" #define SUPER_METHOD_PTR CFISH_SUPER_METHOD_PTR\n"
"#endif\n"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/c/src/Clownfish/Class.c
----------------------------------------------------------------------
diff --git a/runtime/c/src/Clownfish/Class.c b/runtime/c/src/Clownfish/Class.c
index f6fe24b..82a5892 100644
--- a/runtime/c/src/Clownfish/Class.c
+++ b/runtime/c/src/Clownfish/Class.c
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-#define CHY_USE_SHORT_NAMES
#define CFISH_USE_SHORT_NAMES
#define C_CFISH_OBJ
#define C_CFISH_CLASS
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/c/src/Clownfish/Err.c
----------------------------------------------------------------------
diff --git a/runtime/c/src/Clownfish/Err.c b/runtime/c/src/Clownfish/Err.c
index 885b17c..eac107f 100644
--- a/runtime/c/src/Clownfish/Err.c
+++ b/runtime/c/src/Clownfish/Err.c
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-#define CHY_USE_SHORT_NAMES
#define CFISH_USE_SHORT_NAMES
#define C_CFISH_ERR
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/c/src/Clownfish/LockFreeRegistry.c
----------------------------------------------------------------------
diff --git a/runtime/c/src/Clownfish/LockFreeRegistry.c b/runtime/c/src/Clownfish/LockFreeRegistry.c
index 23efef1..396b78b 100644
--- a/runtime/c/src/Clownfish/LockFreeRegistry.c
+++ b/runtime/c/src/Clownfish/LockFreeRegistry.c
@@ -15,7 +15,6 @@
*/
#define C_CFISH_LOCKFREEREGISTRY
-#define CHY_USE_SHORT_NAMES
#define CFISH_USE_SHORT_NAMES
#include "charmony.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/c/src/Clownfish/Obj.c
----------------------------------------------------------------------
diff --git a/runtime/c/src/Clownfish/Obj.c b/runtime/c/src/Clownfish/Obj.c
index 6616747..24cbfd1 100644
--- a/runtime/c/src/Clownfish/Obj.c
+++ b/runtime/c/src/Clownfish/Obj.c
@@ -15,7 +15,6 @@
*/
#define C_CFISH_OBJ
-#define CHY_USE_SHORT_NAMES
#define CFISH_USE_SHORT_NAMES
#include "charmony.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/runtime/common/charmonizer.c b/runtime/common/charmonizer.c
index 0b58d35..a17f425 100644
--- a/runtime/common/charmonizer.c
+++ b/runtime/common/charmonizer.c
@@ -89,6 +89,8 @@ chaz_SharedLib_export_filename(chaz_SharedLib *lib);
#ifndef H_CHAZ_CFLAGS
#define H_CHAZ_CFLAGS
+/* #include "Charmonizer/Core/SharedLibrary.h" */
+
#define CHAZ_CFLAGS_STYLE_POSIX 1
#define CHAZ_CFLAGS_STYLE_GNU 2
#define CHAZ_CFLAGS_STYLE_MSVC 3
@@ -490,7 +492,7 @@ chaz_HeadCheck_contains_member(const char *struct_name, const char *member,
#define H_CHAZ_MAKE
/* #include "Charmonizer/Core/CFlags.h" */
-/* #include "Charmonizer/Core/SharedLib.h" */
+/* #include "Charmonizer/Core/SharedLibrary.h" */
typedef struct chaz_MakeFile chaz_MakeFile;
typedef struct chaz_MakeVar chaz_MakeVar;
@@ -1537,7 +1539,7 @@ void chaz_VariadicMacros_run(void);
#line 17 "src/Charmonizer/Core/SharedLibrary.c"
#include <string.h>
#include <stdlib.h>
-/* #include "Charmonizer/Core/SharedLib.h" */
+/* #include "Charmonizer/Core/SharedLibrary.h" */
/* #include "Charmonizer/Core/Compiler.h" */
/* #include "Charmonizer/Core/Util.h" */
/* #include "Charmonizer/Core/OperatingSystem.h" */
@@ -1661,6 +1663,7 @@ S_get_prefix() {
#include <string.h>
#include <stdlib.h>
/* #include "Charmonizer/Core/CFlags.h" */
+/* #include "Charmonizer/Core/Compiler.h" */
/* #include "Charmonizer/Core/Util.h" */
/* #include "Charmonizer/Core/OperatingSystem.h" */
/* #include "Charmonizer/Core/SharedLibrary.h" */
@@ -3696,6 +3699,7 @@ chaz_HeadCheck_maybe_add_to_cache(const char *header_name, int exists) {
#line 17 "src/Charmonizer/Core/Make.c"
#include <ctype.h>
+#include <stdlib.h>
#include <string.h>
/* #include "Charmonizer/Core/Make.h" */
/* #include "Charmonizer/Core/Compiler.h" */
@@ -4686,6 +4690,7 @@ chaz_OS_rmdir(const char *filepath) {
#include <stdlib.h>
#include <string.h>
/* #include "Charmonizer/Core/Util.h" */
+/* #include "Charmonizer/Core/OperatingSystem.h" */
/* Global verbosity setting. */
int chaz_Util_verbosity = 1;
@@ -4894,6 +4899,7 @@ chaz_Util_can_open_file(const char *file_path) {
/* #include "Charmonizer/Core/ConfWriterRuby.h" */
/* #include "Charmonizer/Core/Util.h" */
/* #include "Charmonizer/Core/Compiler.h" */
+/* #include "Charmonizer/Core/Make.h" */
/* #include "Charmonizer/Core/OperatingSystem.h" */
int
@@ -5146,6 +5152,8 @@ chaz_Booleans_run(void) {
#line 17 "src/Charmonizer/Probe/BuildEnv.c"
/* #include "Charmonizer/Core/HeaderChecker.h" */
+/* #include "Charmonizer/Core/CFlags.h" */
+/* #include "Charmonizer/Core/Compiler.h" */
/* #include "Charmonizer/Core/ConfWriter.h" */
/* #include "Charmonizer/Probe/BuildEnv.h" */
@@ -5361,6 +5369,8 @@ chaz_DirManip_run(void) {
#line 17 "src/Charmonizer/Probe/Floats.c"
/* #include "Charmonizer/Core/HeaderChecker.h" */
+/* #include "Charmonizer/Core/CFlags.h" */
+/* #include "Charmonizer/Core/Compiler.h" */
/* #include "Charmonizer/Core/ConfWriter.h" */
/* #include "Charmonizer/Core/Util.h" */
/* #include "Charmonizer/Probe/Floats.h" */
@@ -6716,6 +6726,7 @@ chaz_Memory_probe_alloca(void) {
#line 17 "src/Charmonizer/Probe/RegularExpressions.c"
/* #include "Charmonizer/Core/HeaderChecker.h" */
+/* #include "Charmonizer/Core/Compiler.h" */
/* #include "Charmonizer/Core/ConfWriter.h" */
/* #include "Charmonizer/Probe/RegularExpressions.h" */
@@ -6764,6 +6775,8 @@ chaz_RegularExpressions_run(void) {
/* #include "Charmonizer/Core/ConfWriter.h" */
/* #include "Charmonizer/Probe/Strings.h" */
+#include <stdlib.h>
+
/* Check for C99-compatible snprintf and possible replacements.
*/
static void
@@ -6936,6 +6949,7 @@ chaz_UnusedVars_run(void) {
/* #include "Charmonizer/Probe/VariadicMacros.h" */
#include <string.h>
#include <stdio.h>
+#include <stdlib.h>
/* Code for verifying ISO-style variadic macros. */
@@ -7029,7 +7043,6 @@ chaz_VariadicMacros_run(void) {
/* #include "Charmonizer/Probe/LargeFiles.h" */
/* #include "Charmonizer/Probe/Memory.h" */
/* #include "Charmonizer/Probe/SymbolVisibility.h" */
-/* #include "Charmonizer/Probe/UnusedVars.h" */
/* #include "Charmonizer/Probe/VariadicMacros.h" */
/* #include "Charmonizer/Core/HeaderChecker.h" */
/* #include "Charmonizer/Core/ConfWriter.h" */
@@ -7374,7 +7387,6 @@ int main(int argc, const char **argv) {
chaz_Floats_run();
chaz_LargeFiles_run();
chaz_Memory_run();
- chaz_UnusedVars_run();
chaz_VariadicMacros_run();
/* Write custom postamble. */
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/runtime/common/charmonizer.main b/runtime/common/charmonizer.main
index 8b181e7..9f433e0 100644
--- a/runtime/common/charmonizer.main
+++ b/runtime/common/charmonizer.main
@@ -31,7 +31,6 @@
#include "Charmonizer/Probe/LargeFiles.h"
#include "Charmonizer/Probe/Memory.h"
#include "Charmonizer/Probe/SymbolVisibility.h"
-#include "Charmonizer/Probe/UnusedVars.h"
#include "Charmonizer/Probe/VariadicMacros.h"
#include "Charmonizer/Core/HeaderChecker.h"
#include "Charmonizer/Core/ConfWriter.h"
@@ -376,7 +375,6 @@ int main(int argc, const char **argv) {
chaz_Floats_run();
chaz_LargeFiles_run();
chaz_Memory_run();
- chaz_UnusedVars_run();
chaz_VariadicMacros_run();
/* Write custom postamble. */
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/ByteBuf.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/ByteBuf.c b/runtime/core/Clownfish/ByteBuf.c
index 8ba056f..d1845b8 100644
--- a/runtime/core/Clownfish/ByteBuf.c
+++ b/runtime/core/Clownfish/ByteBuf.c
@@ -17,7 +17,6 @@
#define C_CFISH_BYTEBUF
#define C_CFISH_VIEWBYTEBUF
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
#include <stdlib.h>
#include <string.h>
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/CharBuf.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/CharBuf.c b/runtime/core/Clownfish/CharBuf.c
index 51ff416..66ced81 100644
--- a/runtime/core/Clownfish/CharBuf.c
+++ b/runtime/core/Clownfish/CharBuf.c
@@ -17,7 +17,6 @@
#define C_CFISH_CHARBUF
#define C_CFISH_STRING
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
#include "charmony.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/Class.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Class.c b/runtime/core/Clownfish/Class.c
index 64735cd..812b3e4 100644
--- a/runtime/core/Clownfish/Class.c
+++ b/runtime/core/Clownfish/Class.c
@@ -19,9 +19,6 @@
#define C_CFISH_STRING
#define C_CFISH_METHOD
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
-
-#include "charmony.h"
#include <stdio.h>
#include <stdlib.h>
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/Err.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Err.c b/runtime/core/Clownfish/Err.c
index 84ad334..5c3add2 100644
--- a/runtime/core/Clownfish/Err.c
+++ b/runtime/core/Clownfish/Err.c
@@ -18,7 +18,6 @@
#define C_CFISH_OBJ
#define C_CFISH_CLASS
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
#include "charmony.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/Hash.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Hash.c b/runtime/core/Clownfish/Hash.c
index 3e86b96..987631c 100644
--- a/runtime/core/Clownfish/Hash.c
+++ b/runtime/core/Clownfish/Hash.c
@@ -17,9 +17,6 @@
#define C_CFISH_HASH
#define C_CFISH_HASHTOMBSTONE
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
-
-#include "charmony.h"
#include <string.h>
#include <stdlib.h>
@@ -350,7 +347,7 @@ SI_rebuild_hash(Hash *self) {
uint32_t
HashTombStone_Get_RefCount_IMP(HashTombStone* self) {
- CHY_UNUSED_VAR(self);
+ UNUSED_VAR(self);
return 1;
}
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/LockFreeRegistry.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/LockFreeRegistry.c b/runtime/core/Clownfish/LockFreeRegistry.c
index 94446c7..c95a791 100644
--- a/runtime/core/Clownfish/LockFreeRegistry.c
+++ b/runtime/core/Clownfish/LockFreeRegistry.c
@@ -16,7 +16,6 @@
#define C_CFISH_LOCKFREEREGISTRY
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
#include "Clownfish/LockFreeRegistry.h"
#include "Clownfish/Err.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/Method.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Method.c b/runtime/core/Clownfish/Method.c
index 03824b1..d7a7327 100644
--- a/runtime/core/Clownfish/Method.c
+++ b/runtime/core/Clownfish/Method.c
@@ -16,9 +16,6 @@
#define C_CFISH_METHOD
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
-
-#include "charmony.h"
#include "Clownfish/Method.h"
#include "Clownfish/String.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/String.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/String.c b/runtime/core/Clownfish/String.c
index 2b1f854..c23314c 100644
--- a/runtime/core/Clownfish/String.c
+++ b/runtime/core/Clownfish/String.c
@@ -19,9 +19,6 @@
#define C_CFISH_STRINGITERATOR
#define C_CFISH_STACKSTRINGITERATOR
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
-
-#include "charmony.h"
#include <string.h>
#include <stdio.h>
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/Test/TestLockFreeRegistry.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Test/TestLockFreeRegistry.c b/runtime/core/Clownfish/Test/TestLockFreeRegistry.c
index 4f69ce0..46d725e 100644
--- a/runtime/core/Clownfish/Test/TestLockFreeRegistry.c
+++ b/runtime/core/Clownfish/Test/TestLockFreeRegistry.c
@@ -16,12 +16,9 @@
#include <string.h>
-#define CHY_USE_SHORT_NAMES
#define CFISH_USE_SHORT_NAMES
#define TESTCFISH_USE_SHORT_NAMES
-#include "charmony.h"
-
#include "Clownfish/Test/TestLockFreeRegistry.h"
#include "Clownfish/LockFreeRegistry.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/Test/TestString.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Test/TestString.c b/runtime/core/Clownfish/Test/TestString.c
index 17c8354..4e506ff 100644
--- a/runtime/core/Clownfish/Test/TestString.c
+++ b/runtime/core/Clownfish/Test/TestString.c
@@ -17,12 +17,9 @@
#include <string.h>
#include <stdio.h>
-#define CHY_USE_SHORT_NAMES
#define CFISH_USE_SHORT_NAMES
#define TESTCFISH_USE_SHORT_NAMES
-#include "charmony.h"
-
#include "Clownfish/Test/TestString.h"
#include "Clownfish/String.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/Test/TestVArray.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Test/TestVArray.c b/runtime/core/Clownfish/Test/TestVArray.c
index 4a9334f..3975090 100644
--- a/runtime/core/Clownfish/Test/TestVArray.c
+++ b/runtime/core/Clownfish/Test/TestVArray.c
@@ -19,8 +19,6 @@
#define CFISH_USE_SHORT_NAMES
#define TESTCFISH_USE_SHORT_NAMES
-#include "charmony.h"
-
#include "Clownfish/Test/TestVArray.h"
#include "Clownfish/String.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/TestHarness/TestFormatter.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/TestHarness/TestFormatter.c b/runtime/core/Clownfish/TestHarness/TestFormatter.c
index 529ed1d..e8c3d33 100644
--- a/runtime/core/Clownfish/TestHarness/TestFormatter.c
+++ b/runtime/core/Clownfish/TestHarness/TestFormatter.c
@@ -18,9 +18,6 @@
#define C_CFISH_TESTFORMATTER
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
-
-#include "charmony.h"
#include "Clownfish/TestHarness/TestFormatter.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/TestHarness/TestSuite.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/TestHarness/TestSuite.c b/runtime/core/Clownfish/TestHarness/TestSuite.c
index d3d4b54..c99c761 100644
--- a/runtime/core/Clownfish/TestHarness/TestSuite.c
+++ b/runtime/core/Clownfish/TestHarness/TestSuite.c
@@ -17,12 +17,9 @@
#include <stdio.h>
#define C_CFISH_TESTSUITE
-#define CHY_USE_SHORT_NAMES
#define CFISH_USE_SHORT_NAMES
#define TESTCFISH_USE_SHORT_NAMES
-#include "charmony.h"
-
#include "Clownfish/TestHarness/TestSuite.h"
#include "Clownfish/String.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/TestHarness/TestSuiteRunner.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/TestHarness/TestSuiteRunner.c b/runtime/core/Clownfish/TestHarness/TestSuiteRunner.c
index 20400b3..f819937 100644
--- a/runtime/core/Clownfish/TestHarness/TestSuiteRunner.c
+++ b/runtime/core/Clownfish/TestHarness/TestSuiteRunner.c
@@ -16,7 +16,6 @@
#define C_CFISH_TESTSUITERUNNER
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
#include "Clownfish/TestHarness/TestSuiteRunner.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/Util/Memory.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Util/Memory.c b/runtime/core/Clownfish/Util/Memory.c
index dcf3214..66f7291 100644
--- a/runtime/core/Clownfish/Util/Memory.c
+++ b/runtime/core/Clownfish/Util/Memory.c
@@ -16,7 +16,6 @@
#define C_CFISH_MEMORY
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
#include "charmony.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/Util/NumberUtils.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Util/NumberUtils.c b/runtime/core/Clownfish/Util/NumberUtils.c
index dd65059..c76b4d9 100644
--- a/runtime/core/Clownfish/Util/NumberUtils.c
+++ b/runtime/core/Clownfish/Util/NumberUtils.c
@@ -16,7 +16,6 @@
#define C_CFISH_NUMBERUTILS
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
#include <string.h>
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/Util/SortUtils.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Util/SortUtils.c b/runtime/core/Clownfish/Util/SortUtils.c
index a778122..a0a4ca3 100644
--- a/runtime/core/Clownfish/Util/SortUtils.c
+++ b/runtime/core/Clownfish/Util/SortUtils.c
@@ -16,7 +16,6 @@
#define C_CFISH_SORTUTILS
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
#include <string.h>
#include "Clownfish/Util/SortUtils.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/Util/StringHelper.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Util/StringHelper.c b/runtime/core/Clownfish/Util/StringHelper.c
index ba117c5..bd45be8 100644
--- a/runtime/core/Clownfish/Util/StringHelper.c
+++ b/runtime/core/Clownfish/Util/StringHelper.c
@@ -18,9 +18,6 @@
#include <string.h>
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
-
-#include "charmony.h"
#include "Clownfish/Util/StringHelper.h"
#include "Clownfish/Err.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/core/Clownfish/VArray.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/VArray.c b/runtime/core/Clownfish/VArray.c
index e7e667c..2472084 100644
--- a/runtime/core/Clownfish/VArray.c
+++ b/runtime/core/Clownfish/VArray.c
@@ -19,9 +19,6 @@
#include <stdlib.h>
#define CFISH_USE_SHORT_NAMES
-#define CHY_USE_SHORT_NAMES
-
-#include "charmony.h"
#include "Clownfish/Class.h"
#include "Clownfish/VArray.h"
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cea231ae/runtime/perl/xs/XSBind.c
----------------------------------------------------------------------
diff --git a/runtime/perl/xs/XSBind.c b/runtime/perl/xs/XSBind.c
index 9f45d14..57c9381 100644
--- a/runtime/perl/xs/XSBind.c
+++ b/runtime/perl/xs/XSBind.c
@@ -773,7 +773,7 @@ static SV *attempt_xsub = NULL;
XS(cfish_Err_attempt_via_xs) {
dXSARGS;
- CHY_UNUSED_VAR(cv);
+ CFISH_UNUSED_VAR(cv);
SP -= items;
if (items != 2) {
CFISH_THROW(CFISH_ERR, "Usage: $sub->(routine, context)");
@@ -854,7 +854,7 @@ CFISH_Err_To_Host_IMP(cfish_Err *self) {
void
cfish_Err_throw_mess(cfish_Class *klass, cfish_String *message) {
- CHY_UNUSED_VAR(klass);
+ CFISH_UNUSED_VAR(klass);
cfish_Err *err = cfish_Err_new(message);
cfish_Err_do_throw(err);
}