summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-10-10 23:28:19 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-10-10 23:36:32 -0700
commitc145ee241a3cd455c002d4bcfab1e17ba1163c2c (patch)
treee7f741c85c173fe6003f4266eaf6dfd7ab5017b3
parentfb834abdeb17d8cf13dd7590edf8842a8be6e8d7 (diff)
downloadperl-c145ee241a3cd455c002d4bcfab1e17ba1163c2c.tar.gz
Document calling convention for Perl_mro_register
I had to look in embed.fnc to find this out when I wanted to use it.
-rw-r--r--mro.c5
-rw-r--r--pod/perlmroapi.pod6
2 files changed, 10 insertions, 1 deletions
diff --git a/mro.c b/mro.c
index 386f898984..e0ab5bc96c 100644
--- a/mro.c
+++ b/mro.c
@@ -114,6 +114,11 @@ Perl_mro_get_from_name(pTHX_ SV *name) {
return INT2PTR(const struct mro_alg *, SvUVX(*data));
}
+/*
+=for apidoc mro_register
+Registers a custom mro plugin. See L<perlmroapi> for details.
+*/
+
void
Perl_mro_register(pTHX_ const struct mro_alg *mro) {
SV *wrapper = newSVuv(PTR2UV(mro));
diff --git a/pod/perlmroapi.pod b/pod/perlmroapi.pod
index 74bd9b2a77..54da7dded2 100644
--- a/pod/perlmroapi.pod
+++ b/pod/perlmroapi.pod
@@ -9,7 +9,7 @@ resolution orders other than the default (linear depth first search).
The C3 method resolution order added in 5.10.0 has been re-implemented as
a plugin, without changing its Perl-space interface.
-Each plugin should register itself with C<Perl_mro_register> by providing
+Each plugin should register itself by providing
the following structure
struct mro_alg {
@@ -20,6 +20,10 @@ the following structure
U32 hash;
};
+and calling C<Perl_mro_register>:
+
+ Perl_mro_register(aTHX_ &my_mro_alg);
+
=over 4
=item resolve