19 lines
345 B
Text
19 lines
345 B
Text
#define PERL_NO_GET_CONTEXT
|
|
#include "EXTERN.h"
|
|
#include "perl.h"
|
|
#include "XSUB.h"
|
|
|
|
#include "c/common.c"
|
|
#include "c/jsonfmt.c"
|
|
|
|
MODULE = FU PACKAGE = FU::XS
|
|
|
|
PROTOTYPES: DISABLE
|
|
|
|
void json_format(SV *val)
|
|
CODE:
|
|
fustr buf;
|
|
fustr_init(&buf, 128);
|
|
fujson_fmt(aTHX_ &buf, val);
|
|
ST(0) = fustr_done(&buf);
|
|
SvUTF8_on(ST(0));
|