Skip to content

Commit

Permalink
Merge pull request #323 from mcorino/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mcorino authored Nov 7, 2024
2 parents dc66844 + fa0d6d8 commit eae5848
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rakelib/lib/extractor/function.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def extract(element)
@template_params << txt
end
@args_string = element.at_xpath('argsstring').text
# transform unified initializers to ctor form (SWIG does not like unified initializers)
# (also see ParamDef#extract)
@args_string.gsub!(/(\w+(::\w+)*)\s*{([^}]*)}/) { |_| "#{$1}(#{$3})"}
check_deprecated
element.xpath('param').each do |node|
p = ParamDef.new(node)
Expand Down Expand Up @@ -370,6 +373,8 @@ def extract(element)
end
if element.at_xpath('defval')
@default = BaseDef.flatten_node(element.at_xpath('defval'))
# transform unified initializers to ctor form (SWIG does not like unified initializers)
@default.sub!(/(\w+(::\w+)*)\s*{([^}]*)}/) { |_| "#{$1}(#{$3})"}
end
end
rescue Exception
Expand Down

0 comments on commit eae5848

Please sign in to comment.