Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'destroy_free_fix' of https://github.com/TimMensch/dub i…

…nto tim_des
  • Loading branch information...
commit 57b70cf797267bbe2506ae6f9d0de0548fd74a99 2 parents c6fa23c + e30d5bc
@gaspard gaspard authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/dub/MemoryStorage.lua
View
6 lib/dub/MemoryStorage.lua
@@ -109,7 +109,9 @@ function lib:functions(parent)
while true do
local ok, elem = coroutine.resume(co, parent, 'functions_list')
if ok and elem then
- if not seen[elem.name] then
+ if parent.dub.destroy=="free" and elem.dtor then
+ -- do nothing: no destructor should be generated in this case
+ elseif not seen[elem.name] then
seen[elem.name] = true
return elem
end
@@ -834,7 +836,7 @@ function parse.param(elem, position)
else
declname = declname[1]
end
-
+
local default = elem:find('defval')
if default then
default = private.flatten(default)
Please sign in to comment.
Something went wrong with that request. Please try again.