Fixes for perl 5.36 with multiplicity + memleak in $st->kv methods
I always keep messing up the aTHX_ and pTHX_ stuff because my system perl isn't built with multiplicity, and I still haven't found a satisfactory way of finding SV leaks. Valgrind can't track those :(
This commit is contained in:
parent
1f7e2de9a0
commit
867543267f
6 changed files with 40 additions and 32 deletions
17
FU.xs
17
FU.xs
|
|
@ -10,6 +10,13 @@
|
|||
#include "perl.h"
|
||||
#include "XSUB.h"
|
||||
|
||||
#ifndef av_push_simple
|
||||
#define av_push_simple av_push
|
||||
#endif
|
||||
#ifndef BOOL_INTERNALS_sv_isbool_true
|
||||
#define BOOL_INTERNALS_sv_isbool_true(x) SvPVXtrue(x)
|
||||
#endif
|
||||
|
||||
#include "c/khashl.h"
|
||||
#include "c/common.c"
|
||||
#include "c/jsonfmt.c"
|
||||
|
|
@ -128,12 +135,12 @@ void disconnect(fupg_conn *c)
|
|||
|
||||
void DESTROY(fupg_conn *c)
|
||||
CODE:
|
||||
fupg_conn_destroy(c);
|
||||
fupg_conn_destroy(aTHX_ c);
|
||||
|
||||
void txn(fupg_conn *c)
|
||||
CODE:
|
||||
FUPG_CONN_COOKIE;
|
||||
ST(0) = fupg_conn_txn(c);
|
||||
ST(0) = fupg_conn_txn(aTHX_ c);
|
||||
|
||||
void exec(fupg_conn *c, SV *sv)
|
||||
CODE:
|
||||
|
|
@ -150,7 +157,7 @@ MODULE = FU PACKAGE = FU::Pg::txn
|
|||
|
||||
void DESTROY(fupg_txn *t)
|
||||
CODE:
|
||||
fupg_txn_destroy(t);
|
||||
fupg_txn_destroy(aTHX_ t);
|
||||
|
||||
void cache(fupg_txn *x, ...)
|
||||
ALIAS:
|
||||
|
|
@ -167,7 +174,7 @@ void status(fupg_txn *t)
|
|||
void txn(fupg_txn *t)
|
||||
CODE:
|
||||
FUPG_TXN_COOKIE;
|
||||
ST(0) = fupg_txn_txn(t);
|
||||
ST(0) = fupg_txn_txn(aTHX_ t);
|
||||
|
||||
void commit(fupg_txn *t)
|
||||
CODE:
|
||||
|
|
@ -267,4 +274,4 @@ void kvh(fupg_st *st)
|
|||
|
||||
void DESTROY(fupg_st *st)
|
||||
CODE:
|
||||
fupg_st_destroy(st);
|
||||
fupg_st_destroy(aTHX_ st);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue