diff options
Diffstat (limited to 'src/pl/plperl/plperl_helpers.h')
-rw-r--r-- | src/pl/plperl/plperl_helpers.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pl/plperl/plperl_helpers.h b/src/pl/plperl/plperl_helpers.h index e8e3f483541..d40567be80f 100644 --- a/src/pl/plperl/plperl_helpers.h +++ b/src/pl/plperl/plperl_helpers.h @@ -1,6 +1,8 @@ #ifndef PL_PERL_HELPERS_H #define PL_PERL_HELPERS_H +#include "mb/pg_wchar.h" + /* * convert from utf8 to database encoding * @@ -59,6 +61,7 @@ utf_e2u(const char *str) static inline char * sv2cstr(SV *sv) { + dTHX; char *val, *res; STRLEN len; @@ -116,6 +119,7 @@ sv2cstr(SV *sv) static inline SV * cstr2sv(const char *str) { + dTHX; SV *sv; char *utf8_str; @@ -143,6 +147,8 @@ cstr2sv(const char *str) static inline void croak_cstr(const char *str) { + dTHX; + #ifdef croak_sv /* Use sv_2mortal() to be sure the transient SV gets freed */ croak_sv(sv_2mortal(cstr2sv(str))); |