diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-01-09 10:38:01 -0500 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-01-09 14:09:50 -0500 |
commit | d20a932d36107eed33bd57b4ce27868b8e52802e (patch) | |
tree | 9ea8ae853b465ad8ef0b1f147c5d04083c4128d1 /tests | |
parent | 8b23c6c8755bca0b0c58b25ee3c4b06c06d72bcd (diff) | |
download | gobject-introspection-d20a932d36107eed33bd57b4ce27868b8e52802e.tar.gz |
mallardwriter: Improve type formatting for Python
Rather than use the glib names like gint/gchar and friends, use the
Python type names. Right now, this is Python 2, but we'll soon be
introducing a special Python 3 formatter.
Diffstat (limited to 'tests')
5 files changed, 17 insertions, 17 deletions
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-property-example.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-property-example.page index be1e239b..43f4b560 100644 --- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-property-example.page +++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-property-example.page @@ -10,7 +10,7 @@ </info> <title>DocExamples.Obj:property-example</title> <synopsis><code mime="text/x-python"> -"property-example" {utf8: gint8} : Read / Write +"property-example" {unicode: gint8} : Read / Write </code></synopsis> <p>This is an example of how to document a property.</p> </page> diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-vfunc.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-vfunc.page index 4e394d2d..4f56baed 100644 --- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-vfunc.page +++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj-vfunc.page @@ -11,7 +11,7 @@ </info> <title>DocExamples.Obj.vfunc</title> <synopsis><code mime="text/x-python"> -@accepts(gint) +@accepts(int) @returns(none) def do_vfunc(self, first_arg): </code></synopsis> diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page index 8447be6b..ab20921a 100644 --- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page +++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page @@ -10,7 +10,7 @@ <link type="guide" xref="DocExamples.Obj" group="method"/> <api:function> <api:returns> - <api:type>gboolean</api:type> + <api:type>bool</api:type> </api:returns> <api:name>doc_examples_obj_method</api:name> <api:arg> @@ -18,15 +18,15 @@ <api:name>self</api:name> </api:arg> <api:arg> - <api:type>gint</api:type> + <api:type>int</api:type> <api:name>first_arg</api:name> </api:arg> <api:arg> - <api:type>gfloat</api:type> + <api:type>float</api:type> <api:name>second_arg</api:name> </api:arg> <api:arg> - <api:type>gboolean</api:type> + <api:type>bool</api:type> <api:name>boolean_arg</api:name> </api:arg> <api:arg> @@ -34,15 +34,15 @@ <api:name>pointer_arg</api:name> </api:arg> <api:arg> - <api:type>utf8</api:type> + <api:type>unicode</api:type> <api:name>string</api:name> </api:arg> </api:function> </info> <title>method</title> <synopsis><code mime="text/x-python"> -@accepts(gint, gfloat, gboolean, gpointer, utf8) -@returns(gboolean) +@accepts(int, float, bool, gpointer, unicode) +@returns(bool) def method(self, first_arg, second_arg, boolean_arg, pointer_arg, string): # Python wrapper for doc_examples_obj_method() </code></synopsis> diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.static_method.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.static_method.page index 1ace5190..35c6c7b9 100644 --- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.static_method.page +++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.static_method.page @@ -10,19 +10,19 @@ <link type="guide" xref="DocExamples.Obj" group="function"/> <api:function> <api:returns> - <api:type>gboolean</api:type> + <api:type>bool</api:type> </api:returns> <api:name>doc_examples_obj_static_method</api:name> <api:arg> - <api:type>gint</api:type> + <api:type>int</api:type> <api:name>out_arg</api:name> </api:arg> </api:function> </info> <title>static_method</title> <synopsis><code mime="text/x-python"> -@accepts(gint) -@returns(gboolean) +@accepts(int) +@returns(bool) def static_method(out_arg): # Python wrapper for doc_examples_obj_static_method() </code></synopsis> diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.array_function.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.array_function.page index 3a0d0549..dd686f84 100644 --- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.array_function.page +++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.array_function.page @@ -10,19 +10,19 @@ <link type="guide" xref="index" group="function"/> <api:function> <api:returns> - <api:type>[gint]</api:type> + <api:type>[int]</api:type> </api:returns> <api:name>doc_examples_array_function</api:name> <api:arg> - <api:type>gint</api:type> + <api:type>int</api:type> <api:name>out_len</api:name> </api:arg> </api:function> </info> <title>array_function</title> <synopsis><code mime="text/x-python"> -@accepts(gint) -@returns([gint]) +@accepts(int) +@returns([int]) def array_function(out_len): # Python wrapper for doc_examples_array_function() </code></synopsis> |