/*
* embed.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, Larry Wall
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
/* (Doing namespace management portably in C is really gross.) */
-/* NO_EMBED is no longer supported. i.e. EMBED is always active. */
+/* By defining PERL_NO_SHORT_NAMES (not done by default) the short forms
+ * (like warn instead of Perl_warn) for the API are not defined.
+ * Not defining the short forms is a good thing for cleaner embedding. */
+
+#ifndef PERL_NO_SHORT_NAMES
/* Hide global symbols */
#define get_opargs Perl_get_opargs
#endif
#define get_ppaddr Perl_get_ppaddr
+#if defined(PERL_CORE) || defined(PERL_EXT)
#define cxinc Perl_cxinc
+#endif
#define deb Perl_deb
#define vdeb Perl_vdeb
#define debprofdump Perl_debprofdump
#define magic_setpos Perl_magic_setpos
#endif
#ifdef PERL_CORE
+#define magic_setregexp Perl_magic_setregexp
+#endif
+#ifdef PERL_CORE
#define magic_setsig Perl_magic_setsig
#endif
#ifdef PERL_CORE
#ifdef PERL_CORE
#define peep Perl_peep
#endif
-#ifdef PERL_CORE
-#endif
#if defined(USE_REENTRANT_API)
#define reentrant_size Perl_reentrant_size
#define reentrant_init Perl_reentrant_init
#define sv_pvutf8n_force Perl_sv_pvutf8n_force
#define sv_pvbyten_force Perl_sv_pvbyten_force
#define sv_recode_to_utf8 Perl_sv_recode_to_utf8
+#define sv_cat_decode Perl_sv_cat_decode
#define sv_reftype Perl_sv_reftype
#define sv_replace Perl_sv_replace
#define sv_report_used Perl_sv_report_used
#define wait4pid Perl_wait4pid
#endif
#ifdef PERL_CORE
+#define parse_unicode_opts Perl_parse_unicode_opts
+#endif
+#ifdef PERL_CORE
#define report_evil_fh Perl_report_evil_fh
#endif
#ifdef PERL_CORE
#define custom_op_name Perl_custom_op_name
#define custom_op_desc Perl_custom_op_desc
#if defined(PERL_COPY_ON_WRITE)
-#ifdef PERL_CORE
#define sv_release_IVX Perl_sv_release_IVX
#endif
-#endif
#define sv_nosharing Perl_sv_nosharing
#define sv_nolocking Perl_sv_nolocking
#define sv_nounlocking Perl_sv_nounlocking
#define sv_copypv Perl_sv_copypv
#define my_atof2 Perl_my_atof2
#define my_socketpair Perl_my_socketpair
+#ifdef PERL_COPY_ON_WRITE
+#define sv_setsv_cow Perl_sv_setsv_cow
+#endif
#if defined(USE_PERLIO) && !defined(USE_SFIO)
#define PerlIO_close Perl_PerlIO_close
#define PerlIO_fill Perl_PerlIO_fill
#define get_opargs() Perl_get_opargs(aTHX)
#endif
#define get_ppaddr() Perl_get_ppaddr(aTHX)
+#if defined(PERL_CORE) || defined(PERL_EXT)
#define cxinc() Perl_cxinc(aTHX)
+#endif
#define vdeb(a,b) Perl_vdeb(aTHX_ a,b)
#define debprofdump() Perl_debprofdump(aTHX)
#define debop(a) Perl_debop(aTHX_ a)
#define magic_setpos(a,b) Perl_magic_setpos(aTHX_ a,b)
#endif
#ifdef PERL_CORE
+#define magic_setregexp(a,b) Perl_magic_setregexp(aTHX_ a,b)
+#endif
+#ifdef PERL_CORE
#define magic_setsig(a,b) Perl_magic_setsig(aTHX_ a,b)
#endif
#ifdef PERL_CORE
#define sv_pvutf8n_force(a,b) Perl_sv_pvutf8n_force(aTHX_ a,b)
#define sv_pvbyten_force(a,b) Perl_sv_pvbyten_force(aTHX_ a,b)
#define sv_recode_to_utf8(a,b) Perl_sv_recode_to_utf8(aTHX_ a,b)
+#define sv_cat_decode(a,b,c,d,e,f) Perl_sv_cat_decode(aTHX_ a,b,c,d,e,f)
#define sv_reftype(a,b) Perl_sv_reftype(aTHX_ a,b)
#define sv_replace(a,b) Perl_sv_replace(aTHX_ a,b)
#define sv_report_used() Perl_sv_report_used(aTHX)
#define wait4pid(a,b,c) Perl_wait4pid(aTHX_ a,b,c)
#endif
#ifdef PERL_CORE
+#define parse_unicode_opts(a) Perl_parse_unicode_opts(aTHX_ a)
+#endif
+#ifdef PERL_CORE
#define report_evil_fh(a,b,c) Perl_report_evil_fh(aTHX_ a,b,c)
#endif
#ifdef PERL_CORE
#define custom_op_name(a) Perl_custom_op_name(aTHX_ a)
#define custom_op_desc(a) Perl_custom_op_desc(aTHX_ a)
#if defined(PERL_COPY_ON_WRITE)
-#ifdef PERL_CORE
#define sv_release_IVX(a) Perl_sv_release_IVX(aTHX_ a)
#endif
-#endif
#define sv_nosharing(a) Perl_sv_nosharing(aTHX_ a)
#define sv_nolocking(a) Perl_sv_nolocking(aTHX_ a)
#define sv_nounlocking(a) Perl_sv_nounlocking(aTHX_ a)
#define sv_copypv(a,b) Perl_sv_copypv(aTHX_ a,b)
#define my_atof2(a,b) Perl_my_atof2(aTHX_ a,b)
#define my_socketpair Perl_my_socketpair
+#ifdef PERL_COPY_ON_WRITE
+#define sv_setsv_cow(a,b) Perl_sv_setsv_cow(aTHX_ a,b)
+#endif
#if defined(USE_PERLIO) && !defined(USE_SFIO)
#define PerlIO_close(a) Perl_PerlIO_close(aTHX_ a)
#define PerlIO_fill(a) Perl_PerlIO_fill(aTHX_ a)
#endif /* PERL_IMPLICIT_CONTEXT */
+#endif /* #ifndef PERL_NO_SHORT_NAMES */
+
/* Compatibility stubs. Compile extensions with -DPERL_NOCOMPAT to
disable them.
an extra argument but grab the context pointer using the macro
dTHX.
*/
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_NO_SHORT_NAMES)
# define croak Perl_croak_nocontext
# define deb Perl_deb_nocontext
# define die Perl_die_nocontext