@@ -73,26 +73,26 @@ class << self
73
73
def self . remove_log_handler
74
74
if @glib_log_handler_id != 0 && @glib_log_domain
75
75
g_log_remove_handler @glib_log_domain , @glib_log_handler_id
76
- @glib_log_handler_id = nil
76
+ @glib_log_handler_id = nil
77
77
end
78
78
end
79
79
80
80
def self . set_log_domain domain
81
81
GLib ::remove_log_handler
82
82
83
- @glib_log_domain = domain
83
+ @glib_log_domain = domain
84
84
85
85
# forward all glib logging output from this domain to a Ruby logger
86
- if @glib_log_domain
87
- # disable this feature for now
88
- #
89
- # libvips background worker threads can issue warnings, and
90
- # since the main thread is blocked waiting for libvips to come back
91
- # from an ffi call, you get a deadlock on the GIL
92
- #
93
- # to fix this, we need a way for g_log() calls from libvips workers
94
- # to be returned via the main thread
95
- #
86
+ if @glib_log_domain
87
+ # disable this feature for now
88
+ #
89
+ # libvips background worker threads can issue warnings, and
90
+ # since the main thread is blocked waiting for libvips to come back
91
+ # from an ffi call, you get a deadlock on the GIL
92
+ #
93
+ # to fix this, we need a way for g_log() calls from libvips workers
94
+ # to be returned via the main thread
95
+ #
96
96
97
97
# @glib_log_handler_id = g_log_set_handler @glib_log_domain,
98
98
# LOG_LEVEL_DEBUG |
@@ -104,13 +104,13 @@ def self.set_log_domain domain
104
104
# LOG_FLAG_FATAL | LOG_FLAG_RECURSION,
105
105
# LOG_HANDLER, nil
106
106
107
- # we must remove any handlers on exit, since libvips may log stuff
108
- # on shutdown and we don't want LOG_HANDLER to be invoked
109
- # after Ruby has gone
110
- at_exit {
111
- GLib ::remove_log_handler
112
- }
113
- end
107
+ # we must remove any handlers on exit, since libvips may log stuff
108
+ # on shutdown and we don't want LOG_HANDLER to be invoked
109
+ # after Ruby has gone
110
+ at_exit {
111
+ GLib ::remove_log_handler
112
+ }
113
+ end
114
114
115
115
end
116
116
@@ -487,7 +487,7 @@ def initialize msg = nil
487
487
@details = msg
488
488
elsif Vips ::vips_error_buffer != ""
489
489
@details = Vips ::vips_error_buffer
490
- Vips ::vips_error_clear
490
+ Vips ::vips_error_clear
491
491
else
492
492
@details = nil
493
493
end
@@ -575,9 +575,9 @@ def self.set_debug debug
575
575
# True if this is at least libvips x.y
576
576
def self . at_least_libvips? ( x , y )
577
577
major = version ( 0 )
578
- minor = version ( 1 )
578
+ minor = version ( 1 )
579
579
580
- major > x || ( major == x && minor >= y )
580
+ major > x || ( major == x && minor >= y )
581
581
end
582
582
583
583
LIBRARY_VERSION = Vips ::version_string
0 commit comments