Skip to content

Commit d0dbfcd

Browse files
committed
Do not use dummy option.
1 parent d69a044 commit d0dbfcd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lua/cURL/impl/cURL.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@ end
518518
end
519519

520520
local setopt = wrap_function("setopt")
521-
local dummy = {}
522521
local custom_setopt = {
523522
[curl.OPT_HTTPPOST or true] = 'setopt_httppost';
524523
[curl.OPT_STREAM_DEPENDS or true] = 'setopt_stream_depends';
@@ -538,14 +537,14 @@ function Easy:setopt(k, v)
538537
if t[curl.OPT_HTTPPOST] then t[curl.OPT_HTTPPOST] = hpost:handle() end
539538
end
540539

541-
local easy = t.stream_depends or t[curl.OPT_STREAM_DEPENDS or dummy]
540+
local easy = t.stream_depends or t[curl.OPT_STREAM_DEPENDS]
542541
if easy and easy._handle then
543542
t = t2 or clone(t); t2 = t;
544543
if t.stream_depends then t.stream_depends = easy:handle() end
545544
if t[curl.OPT_STREAM_DEPENDS] then t[curl.OPT_STREAM_DEPENDS] = easy:handle() end
546545
end
547546

548-
local easy = t.stream_depends_e or t[curl.OPT_STREAM_DEPENDS_E or dummy]
547+
local easy = t.stream_depends_e or t[curl.OPT_STREAM_DEPENDS_E]
549548
if easy and easy._handle then
550549
t = t2 or clone(t); t2 = t;
551550
if t.stream_depends_e then t.stream_depends_e = easy:handle() end

0 commit comments

Comments
 (0)