[svn:parrot] r41221 - in trunk/src: . pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Fri Sep 11 21:54:07 UTC 2009
Author: NotFound
Date: Fri Sep 11 21:54:06 2009
New Revision: 41221
URL: https://trac.parrot.org/parrot/changeset/41221
Log:
[core] add get_pointer vtable to ParrotLibrary and use it in Parrot_clone_lib_into, solving a problem reported by Tene++ on irc
Modified:
trunk/src/dynext.c
trunk/src/pmc/parrotlibrary.pmc
Modified: trunk/src/dynext.c
==============================================================================
--- trunk/src/dynext.c Fri Sep 11 21:15:05 2009 (r41220)
+++ trunk/src/dynext.c Fri Sep 11 21:54:06 2009 (r41221)
@@ -564,7 +564,7 @@
VTABLE_getprop(s, lib_pmc, filename));
STRING * const lib_name = clone_string_into(d, s,
VTABLE_getprop(s, lib_pmc, libname));
- void * const handle = PMC_data(lib_pmc);
+ void * const handle = VTABLE_get_pointer(s, lib_pmc);
STRING * const type =
VTABLE_get_string(s, VTABLE_getprop(s, lib_pmc, type_str));
Modified: trunk/src/pmc/parrotlibrary.pmc
==============================================================================
--- trunk/src/pmc/parrotlibrary.pmc Fri Sep 11 21:15:05 2009 (r41220)
+++ trunk/src/pmc/parrotlibrary.pmc Fri Sep 11 21:54:06 2009 (r41221)
@@ -120,6 +120,20 @@
/*
+=item C<void *get_pointer()>
+
+Get the pointer to the shared library handle.
+
+=cut
+
+*/
+
+ VTABLE void *get_pointer() {
+ return PMC_dlhandle(SELF);
+ }
+
+/*
+
=item C<void set_pointer(void *handle)>
Set the pointer to the shared library handle.
More information about the parrot-commits
mailing list