From 5993cd3f82677cad63c099f696105a8c8609868e Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 21 Mar 2024 03:02:40 +0100 Subject: [PATCH] Allow `@generate_wrappers(Pkg.SubPkg)` Instead of having to write import Pkg.SubPkg BinaryWrappers.@generate_wrappers(SubPkg) with this patch one can simply write BinaryWrappers.@generate_wrappers(Pkg.SubPkg) --- Project.toml | 2 +- src/BinaryWrappers.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index fca15a5..24c8a6e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "BinaryWrappers" uuid = "f01c122e-0ea1-4f85-ad8f-907073ad7a9f" authors = ["Benjamin Lorenz and contributors"] -version = "0.1.2" +version = "0.1.3" [deps] JLLWrappers = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" diff --git a/src/BinaryWrappers.jl b/src/BinaryWrappers.jl index 51afc69..98b3ba0 100644 --- a/src/BinaryWrappers.jl +++ b/src/BinaryWrappers.jl @@ -66,7 +66,7 @@ end # this behaves slightly different than the @get_scratch! function: # it will associate the scratch to the module passed as argument # and use the calling module for the scratch usage (for gc) -macro generate_wrappers(m::Symbol) +macro generate_wrappers(m::Union{Symbol,Expr}) uuid = Base.PkgId(__module__).uuid return quote generate_wrappers($(esc(m)), $(esc(uuid)))