Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #295

Merged
merged 4 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading