New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERRSV is undocumented #13485
Comments
From @bulk88Created by @bulk88ERRSV is used extensively in perlcall, yet undocumented in perlapi or Perl Info
|
From @jkeenanOn Sat Dec 21 15:05:50 2013, bulk88 wrote:
This ticket has received no comments since it was filed in Dec 2013. But documenting aspects of the API is A Good Thing. Is there anyone who could supply a patch? Thank you very much. -- |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Sat, Dec 21, 2013 at 03:05:50PM -0800, bulk88 wrote:
Well its used in several examples in perlcall.pod and elsewhere, so I Do you want to contribute a pod entry? Perhaps one for CLEAR_ERRSV() too? -- |
From @tonycozOn Tue, 06 Oct 2015 03:57:18 -0700, davem wrote:
Patch attached. I also documented the errno handling macros for internal use. Tony |
From @tonycoz120841-errsv-docs.patchFrom 69233ba97da0fb4c228c7c11c673c95a85698572 Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Thu, 4 Jul 2019 10:39:19 +1000
Subject: (perl #120841) document ERRSV and CLEAR_ERRSV()
---
perl.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/perl.h b/perl.h
index a82d055733..6ca32893fb 100644
--- a/perl.h
+++ b/perl.h
@@ -1335,6 +1335,22 @@ EXTERN_C char *crypt(const char *, const char *);
# define RESTORE_ERRNO (errno = saved_errno)
#endif
+/*
+=head1 Warning and Dieing
+
+=for apidoc Amn|SV *|ERRSV
+
+Returns the SV for C<$@>, creating it if needed.
+
+=for apidoc Am|void|CLEAR_ERRSV
+
+Clear the contents of C<$@>, setting it to the empty string.
+
+This replaces any read-only SV with a fresh SV and removes any magic.
+
+=cut
+*/
+
#define ERRSV GvSVn(PL_errgv)
/* contains inlined gv_add_by_type */
--
2.11.0
From ecc05fa56fca41a1bb892a62e4d7fb0183ddee5a Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Thu, 4 Jul 2019 11:12:20 +1000
Subject: (perl #120841) document some errno macros for internal use
---
perl.h | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/perl.h b/perl.h
index 6ca32893fb..e75ca078a9 100644
--- a/perl.h
+++ b/perl.h
@@ -1264,6 +1264,38 @@ EXTERN_C char *crypt(const char *, const char *);
EXTERN_C char *crypt(const char *, const char *);
#endif
+/*
+=head2 Errno
+
+=for apidoc m|void|SETERRNO|int errcode|int vmserrcode
+
+Set C<errno>, and on VMS set C<vaxc$errno>.
+
+=for apidoc mn|void|dSAVEDERRNO
+
+Declare variables needed to save C<errno> and any operating system
+specific error number.
+
+=for apidoc mn|void|dSAVE_ERRNO
+
+Declare variables needed to save C<errno> and any operating system
+specific error number, and save them for optional later restoration
+by C<RESTORE_ERRNO>.
+
+=for apidoc mn|void|SAVE_ERRNO
+
+Save C<errno> and any operating system specific error number for
+optional later restoration by C<RESTORE_ERRNO>. Requires
+C<dSAVEDERRNO> or C<dSAVE_ERRNO> in scope.
+
+=for apidoc mn|RESTORE_ERRNO
+
+Restore C<errno> and any operating system specific error number that
+was saved by C<dSAVE_ERRNO> or C<RESTORE_ERRNO>.
+
+=cut
+*/
+
#ifdef SETERRNO
# undef SETERRNO /* SOCKS might have defined this */
#endif
--
2.11.0
|
From @tonycozOn Wed, 03 Jul 2019 18:37:43 -0700, tonyc wrote:
That errno handling documentation had an error, which I've fixed, pushed the ERRSV docs as 40bec30, the fixed errno handling macro docs as 131e494 and an update to apidoc.pl to make it complain a little more loudly in 256dda5. Tony |
@tonycoz - Status changed from 'open' to 'pending release' |
Migrated from rt.perl.org#120841 (status was 'pending release')
Searchable as RT120841$
The text was updated successfully, but these errors were encountered: