aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2007-07-01 16:29:20 +0000
committerAvatar Richard Brown <rbrown@exherbo.org> 2007-07-01 16:29:20 +0000
commitd93657b6d9a322a25059fc896d0d0ee10a6638f0 (patch)
tree52bd09ede972d50c7330a8814d7c72d21c5a9bad
parentee7937ac91ba1acd2641d1de9e27b343b6d39fbc (diff)
downloadpaludis-d93657b6d9a322a25059fc896d0d0ee10a6638f0.tar.gz
paludis-d93657b6d9a322a25059fc896d0d0ee10a6638f0.tar.xz
(ruby) Fix enum docs.
-rw-r--r--doc/create_ruby_doc.rb4
-rw-r--r--ruby/dep_list.cc30
-rw-r--r--ruby/environment.cc4
-rw-r--r--ruby/log.cc7
-rw-r--r--ruby/mask_reasons.cc2
-rw-r--r--ruby/name.cc7
-rw-r--r--ruby/package_database.cc4
7 files changed, 34 insertions, 24 deletions
diff --git a/doc/create_ruby_doc.rb b/doc/create_ruby_doc.rb
index 3c59ee5..5d34216 100644
--- a/doc/create_ruby_doc.rb
+++ b/doc/create_ruby_doc.rb
@@ -59,13 +59,13 @@ module RDoc
match = Regexp.new(/enum\s+#{type}\s+\{([^}]+)\}/)#, Regexp::MULTILINE)
if file =~ match
enum = $1
- last = enum[Regexp.new(/\slast_(\w+)\s/),1]
+ last = enum[Regexp.new(/\slast_(\w+)[\s,]/),1]
i = 0
enum.each_line do |line|
next if line =~/last/
next if line.strip == ''
next unless line =~ /,/
- (const, comment) = line.split (',',2)
+ (const, comment) = line.split(',',2)
const.strip!
comment.strip!
comment.gsub!(%r{^[^a-zA-Z0-9]*},'')
diff --git a/ruby/dep_list.cc b/ruby/dep_list.cc
index edad5c3..1c2e92f 100644
--- a/ruby/dep_list.cc
+++ b/ruby/dep_list.cc
@@ -1149,7 +1149,7 @@ namespace
l = static_cast<DepListTargetType>(static_cast<int>(l) + 1))
rb_define_const(c_dep_list_target_type, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/dep_list/options.hh, DepListTargetType, c_dep_list_target_type>
+ // cc_enum_special<paludis/dep_list/options-se.hh, DepListTargetType, c_dep_list_target_type>
/*
* Document-module: Paludis::DepListReinstallOption
@@ -1162,7 +1162,7 @@ namespace
l = static_cast<DepListReinstallOption>(static_cast<int>(l) + 1))
rb_define_const(c_dep_list_reinstall_option, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/dep_list/options.hh, DepListReinstallOption, c_dep_list_reinstall_option>
+ // cc_enum_special<paludis/dep_list/options-se.hh, DepListReinstallOption, c_dep_list_reinstall_option>
/*
* Document-module: Paludis::DepListFallBackOption
@@ -1175,7 +1175,7 @@ namespace
l = static_cast<DepListFallBackOption>(static_cast<int>(l) + 1))
rb_define_const(c_dep_list_fall_back_option, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/dep_list/options.hh, DepListFallBackOption, c_dep_list_fall_back_option>
+ // cc_enum_special<paludis/dep_list/options-se.hh, DepListFallBackOption, c_dep_list_fall_back_option>
/*
* Document-module: Paludis::DepListReinstallScmOption
@@ -1188,7 +1188,7 @@ namespace
l = static_cast<DepListReinstallScmOption>(static_cast<int>(l) + 1))
rb_define_const(c_dep_list_reinstall_scm_option, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/dep_list/options.hh, DepListReinstallScmOption, c_dep_list_reinstall_scm_option>
+ // cc_enum_special<paludis/dep_list/options-se.hh, DepListReinstallScmOption, c_dep_list_reinstall_scm_option>
/*
* Document-module: Paludis::DepListDowngradeOption
@@ -1201,7 +1201,7 @@ namespace
l = static_cast<DepListDowngradeOption>(static_cast<int>(l) + 1))
rb_define_const(c_dep_list_downgrade_option, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/dep_list/options.hh, DepListDowngradeOption, c_dep_list_downgrade_option>
+ // cc_enum_special<paludis/dep_list/options-se.hh, DepListDowngradeOption, c_dep_list_downgrade_option>
/*
* Document-module: Paludis::DepListUpgradeOption
@@ -1214,7 +1214,7 @@ namespace
l = static_cast<DepListUpgradeOption>(static_cast<int>(l) + 1))
rb_define_const(c_dep_list_upgrade_option, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/dep_list/options.hh, DepListUpgradeOption, c_dep_list_upgrade_option>
+ // cc_enum_special<paludis/dep_list/options-se.hh, DepListUpgradeOption, c_dep_list_upgrade_option>
/*
* Document-module: Paludis::DepListNewSlotsOption
@@ -1227,7 +1227,7 @@ namespace
l = static_cast<DepListNewSlotsOption>(static_cast<int>(l) + 1))
rb_define_const(c_dep_list_new_slots_option, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/dep_list/options.hh, DepListNewSlotsOption, c_dep_list_new_slots_option>
+ // cc_enum_special<paludis/dep_list/options-se.hh, DepListNewSlotsOption, c_dep_list_new_slots_option>
/*
* Document-module: Paludis::DepListDepsOption
@@ -1240,7 +1240,7 @@ namespace
l = static_cast<DepListDepsOption>(static_cast<int>(l) + 1))
rb_define_const(c_dep_list_deps_option, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/dep_list/options.hh, DepListDepsOption, c_dep_list_deps_option>
+ // cc_enum_special<paludis/dep_list/options-se.hh, DepListDepsOption, c_dep_list_deps_option>
/*
* Document-module: Paludis::DepListCircularOption
@@ -1253,7 +1253,7 @@ namespace
l = static_cast<DepListSuggestedOption>(static_cast<int>(l) + 1))
rb_define_const(c_dep_list_suggested_option, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/dep_list/options.hh, DepListSuggestedOption, c_dep_list_suggested_option>
+ // cc_enum_special<paludis/dep_list/options-se.hh, DepListSuggestedOption, c_dep_list_suggested_option>
/*
* Document-module: Paludis::DepListCircularOption
@@ -1266,7 +1266,7 @@ namespace
l = static_cast<DepListCircularOption>(static_cast<int>(l) + 1))
rb_define_const(c_dep_list_circular_option, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/dep_list/options.hh, DepListCircularOption, c_dep_list_circular_option>
+ // cc_enum_special<paludis/dep_list/options-se.hh, DepListCircularOption, c_dep_list_circular_option>
/*
* Document-module: Paludis::DepListUseOption
@@ -1279,7 +1279,7 @@ namespace
l = static_cast<DepListUseOption>(static_cast<int>(l) + 1))
rb_define_const(c_dep_list_use_option, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/dep_list/options.hh, DepListBlocksOption, c_dep_list_blocks_option>
+ // cc_enum_special<paludis/dep_list/options-se.hh, DepListUseOption, c_dep_list_use_option>
/*
* Document-module: Paludis::DepListBlocksOption
@@ -1292,7 +1292,7 @@ namespace
l = static_cast<DepListBlocksOption>(static_cast<int>(l) + 1))
rb_define_const(c_dep_list_blocks_option, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/dep_list/options.hh, DepListBlocksOption, c_dep_list_blocks_option>
+ // cc_enum_special<paludis/dep_list/options-se.hh, DepListBlocksOption, c_dep_list_blocks_option>
/*
* Document-module: Paludis::DepListEntryState
@@ -1305,7 +1305,7 @@ namespace
l = static_cast<DepListEntryState>(static_cast<int>(l) + 1))
rb_define_const(c_dep_list_entry_state, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/dep_list/options.hh, DepListEntryState, c_dep_list_entry_state>
+ // cc_enum_special<paludis/dep_list/options-se.hh, DepListEntryState, c_dep_list_entry_state>
/*
* Document-module: Paludis::DepListEntryKind
@@ -1318,7 +1318,7 @@ namespace
l = static_cast<DepListEntryKind>(static_cast<int>(l) + 1))
rb_define_const(c_dep_list_entry_kind, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/dep_list/options.hh, DepListEntryKind, c_dep_list_entry_kind>
+ // cc_enum_special<paludis/dep_list/options-se.hh, DepListEntryKind, c_dep_list_entry_kind>
/*
* Document-module: Paludis::DepListOverrideMask
@@ -1331,7 +1331,7 @@ namespace
l = static_cast<DepListOverrideMask>(static_cast<int>(l) + 1))
rb_define_const(c_dep_list_override_mask, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/dep_list/options.hh, DepListOverrideMask, c_dep_list_override_mask>
+ // cc_enum_special<paludis/dep_list/options-se.hh, DepListOverrideMask, c_dep_list_override_mask>
/*
* Document-class: Paludis::DepListOptions
diff --git a/ruby/environment.cc b/ruby/environment.cc
index 0759f1c..ce79d00 100644
--- a/ruby/environment.cc
+++ b/ruby/environment.cc
@@ -689,14 +689,14 @@ namespace
/*
* Document-module: Paludis::MaskReasonsOption
*
- * Each value represents one reason for a package being masked.
+ * Options for Environment.mask_reasons
*/
c_mask_reasons_option = rb_define_module_under(paludis_module(), "MaskReasonsOption");
for (MaskReasonsOption l(static_cast<MaskReasonsOption>(0)), l_end(last_mro) ; l != l_end ;
l = static_cast<MaskReasonsOption>(static_cast<int>(l) + 1))
rb_define_const(c_mask_reasons_option, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/mask_reasons.hh, MaskReason, c_mask_reason>
+ // cc_enum_special<paludis/environment-se.hh, MaskReasonsOption, c_mask_reasons_option>
}
}
diff --git a/ruby/log.cc b/ruby/log.cc
index 230325c..c1e060e 100644
--- a/ruby/log.cc
+++ b/ruby/log.cc
@@ -105,7 +105,12 @@ namespace
rb_define_method(c_log, "program_name=", RUBY_FUNC_CAST(&log_set_program_name), 1);
rb_define_method(c_log, "message", RUBY_FUNC_CAST(&log_message), 2);
- c_log_level = rb_define_class_under(paludis_module(), "LogLevel", rb_cObject);
+ /*
+ * Document-module: Paludis::LogLevel
+ *
+ * Specifies the level of a log message
+ */
+ c_log_level = rb_define_module_under(paludis_module(), "LogLevel");
for (LogLevel l(static_cast<LogLevel>(0)), l_end(last_ll) ; l != l_end ;
l = static_cast<LogLevel>(static_cast<int>(l) + 1))
rb_define_const(c_log_level, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
diff --git a/ruby/mask_reasons.cc b/ruby/mask_reasons.cc
index dda10c3..43cd0a5 100644
--- a/ruby/mask_reasons.cc
+++ b/ruby/mask_reasons.cc
@@ -141,7 +141,7 @@ namespace
l = static_cast<MaskReason>(static_cast<int>(l) + 1))
rb_define_const(c_mask_reason, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/mask_reasons.hh, MaskReason, c_mask_reason>
+ // cc_enum_special<paludis/mask_reasons-se.hh, MaskReason, c_mask_reason>
}
}
diff --git a/ruby/name.cc b/ruby/name.cc
index a8c836d..b104aea 100644
--- a/ruby/name.cc
+++ b/ruby/name.cc
@@ -32,12 +32,17 @@ namespace
void do_register_names()
{
+ /*
+ * Document-module: Paludis::IUseFlagParseMode
+ *
+ * How to parse an IUSE flag string.
+ */
c_iuse_flag_parse_mode = rb_define_module_under(paludis_module(), "IUseFlagParseMode");
for (IUseFlagParseMode l(static_cast<IUseFlagParseMode>(0)), l_end(last_iuse_pm) ; l != l_end ;
l = static_cast<IUseFlagParseMode>(static_cast<int>(l) + 1))
rb_define_const(c_iuse_flag_parse_mode, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
- // cc_enum_special<paludis/name.hh, , c_log_level>
+ // cc_enum_special<paludis/name-se.hh, IUseFlagParseMode , c_iuse_flag_parse_mode>
}
}
diff --git a/ruby/package_database.cc b/ruby/package_database.cc
index 0b3f58b..5b7d92e 100644
--- a/ruby/package_database.cc
+++ b/ruby/package_database.cc
@@ -264,7 +264,7 @@ namespace
*
* Do we want only installed packages, only installable packages, or any package when querying?
*/
- c_package_database_install_state = rb_define_class_under(paludis_module(), "InstallState", rb_cObject);
+ c_package_database_install_state = rb_define_module_under(paludis_module(), "InstallState");
for (InstallState l(static_cast<InstallState>(0)), l_end(last_is) ; l != l_end ;
l = static_cast<InstallState>(static_cast<int>(l) + 1))
rb_define_const(c_package_database_install_state, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));
@@ -276,7 +276,7 @@ namespace
*
* How to order query results.
*/
- c_package_database_query_order = rb_define_class_under(paludis_module(), "QueryOrder", rb_cObject);
+ c_package_database_query_order = rb_define_module_under(paludis_module(), "QueryOrder");
for (QueryOrder l(static_cast<QueryOrder>(0)), l_end(last_qo) ; l != l_end ;
l = static_cast<QueryOrder>(static_cast<int>(l) + 1))
rb_define_const(c_package_database_query_order, value_case_to_RubyCase(stringify(l)).c_str(), INT2FIX(l));