aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2008-11-02 22:41:49 +0000
committerAvatar Richard Brown <rbrown@exherbo.org> 2008-11-02 22:41:49 +0000
commitb97990bd52bcbe0571f11e959fca6d66a96469b4 (patch)
treecb163b7e40e4f145f7b0bb98dc99dfafa9a77975
parente72cb70b3e369f9238ba7ee5a29a3fe0a863b690 (diff)
downloadpaludis-b97990bd52bcbe0571f11e959fca6d66a96469b4.tar.gz
paludis-b97990bd52bcbe0571f11e959fca6d66a96469b4.tar.xz
(ruby) move defines to paludis_ruby.hh
-rw-r--r--ruby/action.cc2
-rw-r--r--ruby/choice.cc4
-rw-r--r--ruby/contents.cc2
-rw-r--r--ruby/dep_list.cc2
-rw-r--r--ruby/dep_spec.cc2
-rw-r--r--ruby/dep_tag.cc2
-rw-r--r--ruby/environment.cc2
-rw-r--r--ruby/filter.cc2
-rw-r--r--ruby/filtered_generator.cc2
-rw-r--r--ruby/find_unused_packages_task.cc2
-rw-r--r--ruby/generator.cc2
-rw-r--r--ruby/log.cc2
-rw-r--r--ruby/mask.cc2
-rw-r--r--ruby/metadata_key.cc2
-rw-r--r--ruby/name.cc2
-rw-r--r--ruby/package_database.cc2
-rw-r--r--ruby/package_id.cc2
-rw-r--r--ruby/paludis_ruby.cc2
-rw-r--r--ruby/paludis_ruby.hh4
-rw-r--r--ruby/qa.cc2
-rw-r--r--ruby/qualified_package_name.cc2
-rw-r--r--ruby/repository.cc2
-rw-r--r--ruby/selection.cc2
-rw-r--r--ruby/version_spec.cc2
24 files changed, 4 insertions, 48 deletions
diff --git a/ruby/action.cc b/ruby/action.cc
index f5c2138..118c4f7 100644
--- a/ruby/action.cc
+++ b/ruby/action.cc
@@ -28,8 +28,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
void dummy_used_this_for_config_protect(const std::string &)
diff --git a/ruby/choice.cc b/ruby/choice.cc
index 08404cf..69b9265 100644
--- a/ruby/choice.cc
+++ b/ruby/choice.cc
@@ -25,10 +25,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-#define RDOC_IS_STUPID(x, y) RUBY_FUNC_CAST((y))
-#define FAKE_RDOC_METHOD(x) //
-
namespace
{
static VALUE c_choice;
diff --git a/ruby/contents.cc b/ruby/contents.cc
index 5a82e34..8f34437 100644
--- a/ruby/contents.cc
+++ b/ruby/contents.cc
@@ -26,8 +26,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_contents;
diff --git a/ruby/dep_list.cc b/ruby/dep_list.cc
index 78e4008..eee94e0 100644
--- a/ruby/dep_list.cc
+++ b/ruby/dep_list.cc
@@ -29,8 +29,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_dep_list_target_type;
diff --git a/ruby/dep_spec.cc b/ruby/dep_spec.cc
index 0e8510a..4a5ed00 100644
--- a/ruby/dep_spec.cc
+++ b/ruby/dep_spec.cc
@@ -38,8 +38,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_dep_spec;
diff --git a/ruby/dep_tag.cc b/ruby/dep_tag.cc
index 2e91e6c..a918a4a 100644
--- a/ruby/dep_tag.cc
+++ b/ruby/dep_tag.cc
@@ -27,8 +27,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_dep_tag;
diff --git a/ruby/environment.cc b/ruby/environment.cc
index 278040a..d4244e1 100644
--- a/ruby/environment.cc
+++ b/ruby/environment.cc
@@ -30,8 +30,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_environment;
diff --git a/ruby/filter.cc b/ruby/filter.cc
index 56feeb2..2c50447 100644
--- a/ruby/filter.cc
+++ b/ruby/filter.cc
@@ -22,8 +22,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_filter_module;
diff --git a/ruby/filtered_generator.cc b/ruby/filtered_generator.cc
index 42c96b2..96716ef 100644
--- a/ruby/filtered_generator.cc
+++ b/ruby/filtered_generator.cc
@@ -22,8 +22,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_filtered_generator;
diff --git a/ruby/find_unused_packages_task.cc b/ruby/find_unused_packages_task.cc
index 45ea043..609b6ee 100644
--- a/ruby/find_unused_packages_task.cc
+++ b/ruby/find_unused_packages_task.cc
@@ -26,8 +26,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_find_unused_packages_task;
diff --git a/ruby/generator.cc b/ruby/generator.cc
index 1c8f7ee..d225eda 100644
--- a/ruby/generator.cc
+++ b/ruby/generator.cc
@@ -22,8 +22,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_generator_module;
diff --git a/ruby/log.cc b/ruby/log.cc
index 7c446dd..77a7ede 100644
--- a/ruby/log.cc
+++ b/ruby/log.cc
@@ -24,8 +24,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_log;
diff --git a/ruby/mask.cc b/ruby/mask.cc
index 0335343..49c7a1b 100644
--- a/ruby/mask.cc
+++ b/ruby/mask.cc
@@ -26,8 +26,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_mask;
diff --git a/ruby/metadata_key.cc b/ruby/metadata_key.cc
index c64d530..4c7f859 100644
--- a/ruby/metadata_key.cc
+++ b/ruby/metadata_key.cc
@@ -30,8 +30,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_metadata_key;
diff --git a/ruby/name.cc b/ruby/name.cc
index 5e4ad8d..7d9d46d 100644
--- a/ruby/name.cc
+++ b/ruby/name.cc
@@ -24,8 +24,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
void do_register_names()
diff --git a/ruby/package_database.cc b/ruby/package_database.cc
index 4482c59..9c1f1a1 100644
--- a/ruby/package_database.cc
+++ b/ruby/package_database.cc
@@ -27,8 +27,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_package_database;
diff --git a/ruby/package_id.cc b/ruby/package_id.cc
index f044c32..4b954b2 100644
--- a/ruby/package_id.cc
+++ b/ruby/package_id.cc
@@ -30,8 +30,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_package_id;
diff --git a/ruby/paludis_ruby.cc b/ruby/paludis_ruby.cc
index 979d60a..c2cb6a6 100644
--- a/ruby/paludis_ruby.cc
+++ b/ruby/paludis_ruby.cc
@@ -31,8 +31,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
template class InstantiationPolicy<RegisterRubyClass, instantiation_method::SingletonTag>;
namespace paludis
diff --git a/ruby/paludis_ruby.hh b/ruby/paludis_ruby.hh
index d9f1cdb..ee94ba8 100644
--- a/ruby/paludis_ruby.hh
+++ b/ruby/paludis_ruby.hh
@@ -49,6 +49,10 @@
#include <ruby.h>
+#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
+#define RDOC_IS_STUPID(x, y) RUBY_FUNC_CAST((y))
+#define FAKE_RDOC_METHOD(x) //
+
namespace paludis
{
diff --git a/ruby/qa.cc b/ruby/qa.cc
index bd8bcd2..634da72 100644
--- a/ruby/qa.cc
+++ b/ruby/qa.cc
@@ -25,8 +25,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_qa_message_level;
diff --git a/ruby/qualified_package_name.cc b/ruby/qualified_package_name.cc
index a552325..92cf4f8 100644
--- a/ruby/qualified_package_name.cc
+++ b/ruby/qualified_package_name.cc
@@ -25,8 +25,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_qualified_package_name;
diff --git a/ruby/repository.cc b/ruby/repository.cc
index d2aeb2b..879856b 100644
--- a/ruby/repository.cc
+++ b/ruby/repository.cc
@@ -33,8 +33,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_repository;
diff --git a/ruby/selection.cc b/ruby/selection.cc
index 0b98c2e..2e5c0a0 100644
--- a/ruby/selection.cc
+++ b/ruby/selection.cc
@@ -22,8 +22,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_selection_module;
diff --git a/ruby/version_spec.cc b/ruby/version_spec.cc
index 60701c0..9bd731c 100644
--- a/ruby/version_spec.cc
+++ b/ruby/version_spec.cc
@@ -24,8 +24,6 @@
using namespace paludis;
using namespace paludis::ruby;
-#define RUBY_FUNC_CAST(x) reinterpret_cast<VALUE (*)(...)>(x)
-
namespace
{
static VALUE c_version_spec;