Skip to content

Commit

Permalink
Fix vobject method
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandlo committed Feb 3, 2025
1 parent dec498c commit ea459a7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/vips/Connection.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Connection.new = function(vconnection)
connection.vconnection = vobject.new(vconnection)
return setmetatable(connection, Connection.mt)
end
function Connection_method:vobject()
return ffi.cast(vobject.typeof, self.vconnection)
end
function Connection_method:filename()
-- Get the filename asscoiated with a connection. Return nil if there is no associated file.
local so = ffi.cast('VipsConnection *', self.vconnection)
Expand Down
4 changes: 0 additions & 4 deletions src/vips/Source.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ local vips_lib = ffi.load(ffi.os == "Windows" and "libvips-42.dll" or "vips")

local Source = {}

Source.vobject = function(self)
return ffi.cast(vobject.typeof, self)
end

Source.new_from_descriptor = function(descriptor)
local source = vips_lib.vips_source_new_from_descriptor(descriptor)
if source == ffi.NULL then
Expand Down
4 changes: 0 additions & 4 deletions src/vips/Target.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ local vips_lib = ffi.load(ffi.os == "Windows" and "libvips-42.dll" or "vips")

local Target = {}

Target.vobject = function(self)
return ffi.cast(vobject.typeof, self)
end

Target.new_to_descriptor = function(descriptor)
collectgarbage("stop")
local target = vips_lib.vips_target_new_to_descriptor(descriptor)
Expand Down

0 comments on commit ea459a7

Please sign in to comment.