ariovistus avatar ariovistus committed 0b08322

properly document Borrowed

Comments (0)

Files changed (11)

 		<tr><td id="docfooter">
 			Page was generated with
 			<img src="/candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
-			on Thu Sep  6 22:58:08 2012
+			on Thu Sep  6 23:29:17 2012
 
 		</td></tr>
 	</table>

pyd/class_wrap.html

 		<tr><td id="docfooter">
 			Page was generated with
 			<img src="/candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
-			on Thu Sep  6 22:58:08 2012
+			on Thu Sep  6 23:29:17 2012
 
 		</td></tr>
 	</table>
 		<tr><td id="docfooter">
 			Page was generated with
 			<img src="/candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
-			on Thu Sep  6 22:58:08 2012
+			on Thu Sep  6 23:29:17 2012
 
 		</td></tr>
 	</table>

pyd/embedded.html

 		<tr><td id="docfooter">
 			Page was generated with
 			<img src="/candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
-			on Thu Sep  6 22:58:08 2012
+			on Thu Sep  6 23:29:17 2012
 
 		</td></tr>
 	</table>

pyd/exception.html

 		<tr><td id="docfooter">
 			Page was generated with
 			<img src="/candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
-			on Thu Sep  6 22:58:08 2012
+			on Thu Sep  6 23:29:17 2012
 
 		</td></tr>
 	</table>

pyd/func_wrap.html

 		<tr><td id="docfooter">
 			Page was generated with
 			<img src="/candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
-			on Thu Sep  6 22:58:08 2012
+			on Thu Sep  6 23:29:17 2012
 
 		</td></tr>
 	</table>

pyd/make_object.html

 		<tr><td id="docfooter">
 			Page was generated with
 			<img src="/candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
-			on Thu Sep  6 22:58:08 2012
+			on Thu Sep  6 23:29:17 2012
 
 		</td></tr>
 	</table>
 		<tr><td id="docfooter">
 			Page was generated with
 			<img src="/candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
-			on Thu Sep  6 22:58:08 2012
+			on Thu Sep  6 23:29:17 2012
 
 		</td></tr>
 	</table>

pyd/pydobject.html

 		<tr><td id="docfooter">
 			Page was generated with
 			<img src="/candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
-			on Thu Sep  6 22:58:08 2012
+			on Thu Sep  6 23:29:17 2012
 
 		</td></tr>
 	</table>
 <script>explorer.outline.addDecl('Borrowed');</script>(T);
 </span></dt>
 <script>explorer.outline.writeEnabled = false;</script>
-<dd>Not part of Python api!!! <br><br>
+<dd>Denotes a borrowed reference.
+<br><br>
+Intended use: An api function Foo returning a borrowed reference will
+    have return type 
+<span class="currsymbol">Borrowed</span>
+<script>explorer.outline.addDecl('Borrowed');</script>!PyObject* instead of PyObject*. Py_INCREF can
+    be used to get the original type back.
+
+<br><br>
+<b>Params:</b><br>
+<table><tr>
+<td nowrap valign="top" style="padding-right: 8px">T</td>
+<td>Python object type (PyObject, PyTypeObject, etc)</td></tr>
+</table><br>
+<b>Example:</b><br>
+<pre class="d_code">    <u>Borrowed</u>!PyObject* borrowed = PyTuple_GetItem(tuple, 0);
+    PyObject* item = Py_XINCREF(borrowed);
+</pre>
+<br><br>
 
 </dd>
 
 <script>explorer.outline.writeEnabled = true;</script>
-<dt><span class="decl">template 
-<span class="currsymbol">PyObject_VAR_HEAD</span>
-<script>explorer.outline.addDecl('PyObject_VAR_HEAD');</script>()</span></dt>
+<dt><span class="decl">Borrowed!(T)* 
+<span class="currsymbol">borrowed</span>
+<script>explorer.outline.addDecl('borrowed');</script>(T)(T* <span class="funcparam">obj</span>);
+</span></dt>
 <script>explorer.outline.writeEnabled = false;</script>
-<dd>End Not part of Python api!!! <br><br>
+<dd>Convert a python reference to 
+<span class="currsymbol">borrowed</span>
+<script>explorer.outline.addDecl('borrowed');</script> reference.<br><br>
 
 </dd>
 
 		<tr><td id="docfooter">
 			Page was generated with
 			<img src="/candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
-			on Thu Sep  6 22:58:08 2012
+			on Thu Sep  6 23:29:17 2012
 
 		</td></tr>
 	</table>

pyd/struct_wrap.html

 		<tr><td id="docfooter">
 			Page was generated with
 			<img src="/candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
-			on Thu Sep  6 22:58:08 2012
+			on Thu Sep  6 23:29:17 2012
 
 		</td></tr>
 	</table>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.