Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
SUSE:SLE-12-SP1:GA
python3-sip
0001-Fixed_the_KeepReference_function_annotatio...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Fixed_the_KeepReference_function_annotation_when.patch of Package python3-sip
# HG changeset patch # User Phil Thompson <phil@riverbankcomputing.com> # Date 1391520766 0 # Node ID 2737c3074f4db5030f6e268916b836a9d37bae8a # Parent fb6dbd80297bd18f14076ad3a35ca126401895f6 Fixed the /KeepReference/ function annotation when applied to static functions. diff -r fb6dbd80297b -r 2737c3074f4d sipgen/gencode.c --- a/sipgen/gencode.c Tue Feb 04 13:31:55 2014 +0000 +++ b/sipgen/gencode.c Tue Feb 04 13:32:46 2014 +0000 @@ -12648,8 +12648,8 @@ if (keepReference(res)) prcode(fp, "\n" -" sipKeepReference(sipSelf, %d, sipResObj);\n" - , res->key); +" sipKeepReference(%s, %d, sipResObj);\n" + , (isStatic(od) ? "NULL" : "sipSelf"), res->key); /* * Keep a reference to any argument with the result if the function is diff -r fb6dbd80297b -r 2737c3074f4d sphinx/annotations.rst --- a/sphinx/annotations.rst Tue Feb 04 13:31:55 2014 +0000 +++ b/sphinx/annotations.rst Tue Feb 04 13:32:46 2014 +0000 @@ -698,6 +698,10 @@ :aanno:`KeepReference` argument annotation when applied to the type of the value returned by the function. + If the function is a class method or an ordinary function then the + reference is not kept by any other object and so the returned value will + never be garbage collected. + .. function-annotation:: KeywordArgs
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor