This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
parts/apicheck.pl: Add a few comments; white-space
[perl5.git] / util.c
diff --git a/util.c b/util.c
index 165d13a..76f6ef4 100644 (file)
--- a/util.c
+++ b/util.c
@@ -2103,6 +2103,15 @@ S_env_alloc(void *current, Size_t l1, Size_t l2, Size_t l3, Size_t size)
 
 #  if !defined(WIN32) && !defined(NETWARE)
 
+/*
+=for apidoc my_setenv
+
+A wrapper for the C library L<setenv(3)>.  Don't use the latter, as the perl
+version has desirable safeguards
+
+=cut
+*/
+
 void
 Perl_my_setenv(pTHX_ const char *nam, const char *val)
 {
@@ -2683,6 +2692,15 @@ dup2(int oldfd, int newfd)
 #ifndef PERL_MICRO
 #ifdef HAS_SIGACTION
 
+/*
+=for apidoc rsignal
+
+A wrapper for the C library L<signal(2)>.  Don't use the latter, as the Perl
+version knows things that interact with the rest of the perl interpreter.
+
+=cut
+*/
+
 Sighandler_t
 Perl_rsignal(pTHX_ int signo, Sighandler_t handler)
 {
@@ -3342,7 +3360,7 @@ Perl_get_context(void)
     dVAR;
 #  ifdef OLD_PTHREADS_API
     pthread_addr_t t;
-    int error = pthread_getspecific(PL_thr_key, &t)
+    int error = pthread_getspecific(PL_thr_key, &t);
     if (error)
        Perl_croak_nocontext("panic: pthread_getspecific, error=%d", error);
     return (void*)t;
@@ -4931,7 +4949,7 @@ Perl_quadmath_format_single(const char* format)
         return NULL;
     if (format[len - 2] != 'Q') {
         char* fixed;
-        Newx(fixed, len + 1, char);
+        Newx(fixed, len + 2, char);
         memcpy(fixed, format, len - 1);
         fixed[len - 1] = 'Q';
         fixed[len    ] = format[len - 1];
@@ -6425,8 +6443,8 @@ Perl_get_c_backtrace(pTHX_ int depth, int skip)
     Safefree(raw_frames);
     return bt;
 #else
-    PERL_UNUSED_ARGV(depth);
-    PERL_UNUSED_ARGV(skip);
+    PERL_UNUSED_ARG(depth);
+    PERL_UNUSED_ARG(skip);
     return NULL;
 #endif
 }