autogenerate API listing from comments in the source (from Benjamin
[p5sagit/p5-mst-13.2.git] / perl.h
diff --git a/perl.h b/perl.h
index 30130fd..518f4b3 100644 (file)
--- a/perl.h
+++ b/perl.h
 /* See L<perlguts/"The Perl API"> for detailed notes on
  * PERL_IMPLICIT_CONTEXT and PERL_IMPLICIT_SYS */
 
+#ifdef USE_ITHREADS
+#  if !defined(MULTIPLICITY) && !defined(PERL_OBJECT)
+#    define MULTIPLICITY
+#  endif
+#endif
+
 #ifdef USE_THREADS
 #  ifndef PERL_IMPLICIT_CONTEXT
 #    define PERL_IMPLICIT_CONTEXT
 #  endif
 #endif
 
-#if defined(USE_ITHREADS) && !defined(MULTIPLICITY) && !defined(PERL_OBJECT)
-#  include "error: USE_ITHREADS must be built with MULTIPLICITY"
-#endif
-
 #ifdef PERL_OBJECT
 
 /* PERL_OBJECT explained  - DickH and DougL @ ActiveState.com
@@ -189,6 +191,10 @@ struct perl_thread;
 #  define dTHX         dTHXa(PERL_GET_THX)
 #  define pTHX_                pTHX,
 #  define aTHX_                aTHX,
+#  define pTHX_1       2       
+#  define pTHX_2       3
+#  define pTHX_3       4
+#  define pTHX_4       5
 #endif
 
 #define STATIC static
@@ -221,6 +227,10 @@ struct perl_thread;
 #  define aTHX_
 #  define dTHXa(a)     dNOOP
 #  define dTHX         dNOOP
+#  define pTHX_1       1       
+#  define pTHX_2       2
+#  define pTHX_3       3
+#  define pTHX_4       4
 #endif
 
 #ifndef pTHXo
@@ -1674,6 +1684,14 @@ typedef pthread_key_t    perl_key;
 #  endif
 #endif
 
+#ifndef SVf
+#  ifdef CHECK_FORMAT
+#    define SVf "p"
+#  else
+#    define SVf "_"
+#  endif 
+#endif
+
 /* Some unistd.h's give a prototype for pause() even though
    HAS_PAUSE ends up undefined.  This causes the #define
    below to be rejected by the compmiler.  Sigh.
@@ -1870,6 +1888,8 @@ struct ptr_tbl {
 #define U_V(what) (cast_uv((NV)(what)))
 #endif
 
+/* Mention NV_PRESERVES_UV so that Configure picks it up. */
+
 /* These do not care about the fractional part, only about the range. */
 #define NV_WITHIN_IV(nv) (I_V(nv) >= IV_MIN && I_V(nv) <= IV_MAX)
 #define NV_WITHIN_UV(nv) ((nv)>=0.0 && U_V(nv) >= UV_MIN && U_V(nv) <= UV_MAX)