Skip to content

Commit

Permalink
Merge pull request #295 from mcorino/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mcorino authored Aug 24, 2024
2 parents 38dcbdc + 66f6be8 commit e8b858e
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/wx/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# This software is released under the MIT license.

module Wx
WXRUBY_VERSION = '1.1.1'
WXRUBY_VERSION = '1.1.2'
end
19 changes: 14 additions & 5 deletions rakelib/lib/core/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,20 @@ def included_directors
directors.select { |dir| Package.full_docs? || !Config.instance.excluded_module?(dir.spec) }
end

def director_for_class(class_name)
dir = included_directors.detect { |dir| dir.spec.module_name == class_name || dir.spec.items.include?(class_name) }
subpackages.each_value.detect { |spkg| dir = spkg.director_for_class(class_name) } if dir.nil?
dependencies.detect { |pkgdep| dir = pkgdep.director_for_class(class_name) } if dir.nil?
dir = parent.director_for_class(class_name) if dir.nil? && parent
def director_for_class(class_name, pkg_stack=[])
dir = included_directors.detect { |dir| dir.spec.module_name == class_name || dir.spec.items.include?(dir.spec.classdef_name(class_name)) }
pkg_stack << self
subpackages.each_value.detect do |spkg|
unless pkg_stack.include?(spkg) # should never happen
dir = spkg.director_for_class(class_name, pkg_stack)
end
end if dir.nil?
dependencies.detect do |pkgdep|
unless pkg_stack.include?(pkgdep)
dir = pkgdep.director_for_class(class_name)
end
end if dir.nil?
dir = parent.director_for_class(class_name) if dir.nil? && parent && !pkg_stack.include?(parent)
dir
end

Expand Down
3 changes: 3 additions & 0 deletions rakelib/lib/director/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ def setup
spec.ignore 'wxGetEmailAddress(char *,int)',
'wxGetUserId(char *,int)',
'wxGetUserName(char *,int)'
if Config.instance.wx_version >= '3.3.0'
spec.ignore_unless('WXMSW', 'wxMSWIsOnSecureScreen')
end
spec.map 'wxMemorySize' => 'Integer' do
map_out code: <<~__CODE
$result = LL2NUM(wxLongLongNative($1).GetValue());
Expand Down
2 changes: 1 addition & 1 deletion rakelib/lib/generate/doc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ def run
fdoc.puts
mod_indent = 0
package.all_modules.each do |modnm|
fdoc.iputs("module #{package.fullname}", mod_indent)
fdoc.iputs("module #{modnm}", mod_indent)
fdoc.puts
mod_indent += 1
end
Expand Down
7 changes: 6 additions & 1 deletion rakelib/lib/swig_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,12 @@ def collect_methods
end

def run
member_map = collect_methods rescue $!
begin
member_map = collect_methods
rescue Exception
STDERR.puts "#{$!}\n#{$!.backtrace.join("\n")}"
exit(1)
end
return if member_map.empty?

# create re match list for class names
Expand Down

0 comments on commit e8b858e

Please sign in to comment.