summaryrefslogtreecommitdiffhomepage
path: root/lib/yard/mruby/handlers/c/header/function_handler.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yard/mruby/handlers/c/header/function_handler.rb')
-rw-r--r--lib/yard/mruby/handlers/c/header/function_handler.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/yard/mruby/handlers/c/header/function_handler.rb b/lib/yard/mruby/handlers/c/header/function_handler.rb
index 11f8efc..079f114 100644
--- a/lib/yard/mruby/handlers/c/header/function_handler.rb
+++ b/lib/yard/mruby/handlers/c/header/function_handler.rb
@@ -3,9 +3,9 @@ module YARD::MRuby::Handlers::C::Header
MATCH = /
MRB_(API|INLINE)\s+
((struct\s+)?\w+(\s*\*)?)\s*
- ((\w+\s+)+)?(\w+)\s*\(
+ ((\w+\s+)+)?(\w+)\s*
+ \(([\w\s\*,])*\)
/mx
- #\(([\w\*,]*)\)
handles MATCH
statement_class ToplevelStatement
@@ -25,10 +25,7 @@ module YARD::MRuby::Handlers::C::Header
register_docstring(obj, statement.comments.source, statement)
end
- if retype != 'void'
- obj.add_tag(YARD::Tags::Tag.new(:return,"", "")) unless obj.has_tag?(:return)
- obj.tag(:return).types = [retype]
- end
+ obj.return_type = retype
end
end