pg: Statement preparing + inspection; less wonky object handling?
This commit is contained in:
parent
c51b5f3598
commit
187417f160
5 changed files with 186 additions and 10 deletions
11
c/common.c
11
c/common.c
|
|
@ -1,3 +1,14 @@
|
|||
/* Because I don't know how to use sv_setref_pv() correctly. */
|
||||
|
||||
static SV *fupg_selfobj_(pTHX_ SV **self, void *obj, const char *klass) {
|
||||
*self = newSViv(PTR2IV(obj));
|
||||
return sv_bless(sv_2mortal(newRV_noinc(*self)), gv_stashpv(klass, GV_ADD));
|
||||
}
|
||||
/* Write a blessed SV to obj->self and returns a mortal ref to it */
|
||||
#define fupg_selfobj(obj, klass) fupg_selfobj_(aTHX_ &((obj)->self), obj, klass)
|
||||
|
||||
|
||||
|
||||
/* Custom string builder, should be slightly faster than using Sv* macros directly. */
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue