Skip to content

Commit 8492e14

Browse files
committed
Fix vobject method
1 parent dec498c commit 8492e14

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/vips/Connection.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ Connection.new = function(vconnection)
2323
connection.vconnection = vobject.new(vconnection)
2424
return setmetatable(connection, Connection.mt)
2525
end
26+
function Connection_method:vobject()
27+
return ffi.cast(vobject.typeof, self.vconnection)
28+
end
29+
2630
function Connection_method:filename()
2731
-- Get the filename asscoiated with a connection. Return nil if there is no associated file.
2832
local so = ffi.cast('VipsConnection *', self.vconnection)

src/vips/Source.lua

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33
local ffi = require "ffi"
44

55
local verror = require "vips.verror"
6-
local vobject = require "vips.vobject"
76
local Connection = require "vips.Connection"
87

98
local vips_lib = ffi.load(ffi.os == "Windows" and "libvips-42.dll" or "vips")
109

1110
local Source = {}
1211

13-
Source.vobject = function(self)
14-
return ffi.cast(vobject.typeof, self)
15-
end
16-
1712
Source.new_from_descriptor = function(descriptor)
1813
local source = vips_lib.vips_source_new_from_descriptor(descriptor)
1914
if source == ffi.NULL then

src/vips/Target.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ local vips_lib = ffi.load(ffi.os == "Windows" and "libvips-42.dll" or "vips")
99

1010
local Target = {}
1111

12-
Target.vobject = function(self)
13-
return ffi.cast(vobject.typeof, self)
14-
end
15-
1612
Target.new_to_descriptor = function(descriptor)
1713
collectgarbage("stop")
1814
local target = vips_lib.vips_target_new_to_descriptor(descriptor)

0 commit comments

Comments
 (0)