Skip to content

Commit 553bd11

Browse files
committed
Fix vobject method
1 parent dec498c commit 553bd11

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,12 @@
22

33
local ffi = require "ffi"
44

5-
local vobject = require "vips.vobject"
65
local Connection = require "vips.Connection"
76

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

109
local Target = {}
1110

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy