Did I find the right examples for you? yes no

All Samples(14)  |  Call(9)  |  Derive(0)  |  Import(5)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/lltypesystem/llheap.py   plexnet(Download)
# only for the LLInterpreter.  Don't use directly.
 
from pypy.rpython.lltypesystem.lltype import pyobjectptr, malloc, free, typeOf
from pypy.rpython.lltypesystem.llmemory import weakref_create, weakref_deref
 
def weakref_create_getlazy(objgetter):
    return weakref_create(objgetter())
 
malloc_nonmovable = malloc
 

src/s/y/Sypy-HEAD/rpython/lltypesystem/llheap.py   Sypy(Download)
# only for the LLInterpreter.  Don't use directly.
 
from pypy.rpython.lltypesystem.lltype import pyobjectptr, malloc, free, typeOf
from pypy.rpython.lltypesystem.llmemory import weakref_create, weakref_deref
 
def weakref_create_getlazy(objgetter):
    return weakref_create(objgetter())
 
malloc_nonmovable = malloc
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rlib/rweakrefimpl.py   plexnet(Download)
from pypy.objspace.flow.model import Constant
from pypy.rpython.lltypesystem import lltype, llmemory, rstr, rclass, rdict
from pypy.rpython.lltypesystem.llmemory import weakref_create, weakref_deref
from pypy.rpython.lltypesystem.lloperation import llop
from pypy.rpython.rclass import getinstancerepr
def ll_set_nonnull(d, llkey, llvalue):
    hash = ll_strhash(llkey)
    valueref = weakref_create(llvalue)    # GC effects here, before the rest
    i = rdict.ll_dict_lookup(d, llkey, hash)
    everused = d.entries.everused(i)

src/s/y/Sypy-HEAD/rlib/_rweakvaldict.py   Sypy(Download)
from pypy.objspace.flow.model import Constant
from pypy.rpython.lltypesystem import lltype, llmemory, rstr, rclass, rdict
from pypy.rpython.lltypesystem.llmemory import weakref_create, weakref_deref
from pypy.rpython.lltypesystem.lloperation import llop
from pypy.rpython.rclass import getinstancerepr
    def ll_set_nonnull(self, d, llkey, llvalue):
        hash = self.ll_keyhash(llkey)
        valueref = weakref_create(llvalue)    # GC effects here, before the rest
        i = rdict.ll_dict_lookup(d, llkey, hash) & rdict.MASK
        everused = d.entries.everused(i)

src/s/y/Sypy-HEAD/rlib/_rweakkeydict.py   Sypy(Download)
from pypy.objspace.flow.model import Constant
from pypy.rpython.lltypesystem import lltype, llmemory, rclass, rdict
from pypy.rpython.lltypesystem.llmemory import weakref_create, weakref_deref
from pypy.rpython.lltypesystem.lloperation import llop
from pypy.rpython.rclass import getinstancerepr
def ll_set_nonnull(d, llkey, llvalue):
    hash = compute_identity_hash(llkey)
    keyref = weakref_create(llkey)    # GC effects here, before the rest
    i = rdict.ll_dict_lookup(d, llkey, hash) & rdict.MASK
    everused = d.entries.everused(i)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/rweakref.py   plexnet(Download)
    def _weakref_create(self, llinstance):
        return llmemory.weakref_create(llinstance)
 
class OOWeakRefRepr(BaseWeakRefRepr):
    lowleveltype = ootype.WeakReference

src/s/y/Sypy-HEAD/rpython/rweakref.py   Sypy(Download)
    def _weakref_create(self, llinstance):
        return llmemory.weakref_create(llinstance)
 
class OOWeakRefRepr(BaseWeakRefRepr):
    lowleveltype = ootype.WeakReference

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/test/test_rweakref.py   plexnet(Download)
        def g():
            s = lltype.malloc(S)
            w = llmemory.weakref_create(s)
            assert llmemory.weakref_deref(lltype.Ptr(S), w) == s
            assert llmemory.weakref_deref(lltype.Ptr(S), w) == s

src/s/y/Sypy-HEAD/rpython/test/test_rweakref.py   Sypy(Download)
        def g():
            s = lltype.malloc(S)
            w = llmemory.weakref_create(s)
            assert llmemory.weakref_deref(lltype.Ptr(S), w) == s
            assert llmemory.weakref_deref(lltype.Ptr(S), w) == s