From: Stephen McCamant Date: Tue, 28 Dec 2004 16:01:49 +0000 (-0800) Subject: [perl #32967] [PATCH] Re: More B bugs: svref_2object X-Git-Tag: accepted/trunk/20130322.191538~21251 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f31c3107030f031d9abc088f3d5f450116edba5b;p=platform%2Fupstream%2Fperl.git [perl #32967] [PATCH] Re: More B bugs: svref_2object Message-ID: <16849.62445.116153.489478@apocalypse.OCF.Berkeley.EDU> p4raw-id: //depot/perl@23845 --- diff --git a/ext/B/B.pm b/ext/B/B.pm index b70c710..4110fe2 100644 --- a/ext/B/B.pm +++ b/ext/B/B.pm @@ -368,6 +368,10 @@ class. Apart from functions such as C, this is the primary way to get an initial "handle" on an internal perl data structure which can then be followed with the other access methods. +The returned object will only be valid as long as the underlying OPs +and SVs continue to exist. Do not attempt to use the object after the +underlying structures are freed. + =item amagic_generation Returns the SV object corresponding to the C variable C. @@ -523,7 +527,11 @@ The bulk of the C module is the methods for accessing fields of these structures. Note that all access is read-only. You cannot modify the internals by -using this module. +using this module. Also, note that the B::OP and B::SV objects created +by this module are only valid for as long as the underlying objects +exist; their creation doesn't increase the reference counts of the +underlying objects. Trying to access the fields of a freed object will +give incomprehensible results, or worse. =head2 SV-RELATED CLASSES