mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-20 10:18:25 +00:00
[Quest API] Use binding library for perl apis (#2216)
* Add perlbind library * Convert perl apis to perlbind
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#include <perlbind/perlbind.h>
|
||||
|
||||
namespace perlbind { namespace detail {
|
||||
|
||||
extern "C" int gc(pTHX_ SV* sv, MAGIC* mg)
|
||||
{
|
||||
auto pfunc = INT2PTR(perlbind::detail::function_base*, SvIV(sv));
|
||||
delete pfunc;
|
||||
return 1;
|
||||
}
|
||||
|
||||
const MGVTBL function_base::mgvtbl = { 0, 0, 0, 0, gc, 0, 0, 0 };
|
||||
|
||||
} // namespace detail
|
||||
} // namespace perlbind
|
||||
Reference in New Issue
Block a user