From 99793e684e0d21bb8475d0a825882e6fa5b2e02c Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Tue, 26 Dec 2017 08:53:38 +0100 Subject: [PATCH] c-api/objbuffer: working. --- c-api/objbuffer.po | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/c-api/objbuffer.po b/c-api/objbuffer.po index 6eb4efd4..28ccb6fa 100644 --- a/c-api/objbuffer.po +++ b/c-api/objbuffer.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: Python 3.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-04-02 22:11+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"PO-Revision-Date: 2018-01-29 00:24+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: fr\n" @@ -19,7 +19,7 @@ msgstr "" #: ../Doc/c-api/objbuffer.rst:4 msgid "Old Buffer Protocol" -msgstr "" +msgstr "Ancien *Buffer Protocol*" #: ../Doc/c-api/objbuffer.rst:8 msgid "" @@ -30,6 +30,12 @@ msgid "" "you control over the lifetime of the resources acquired when a buffer is " "exported." msgstr "" +"Ces fonctions faisaient partie de l'API de l'ancien protocol de tampons dans " +"Python 2. Dans Python 3, ce protocole n'existe plus, mais les fonctions sont " +"toujours exposées pour simplifier le portage de code Python 2.x. Elles se " +"comportent comme une abstraction de compatibilité du :ref:`nouveau protocole " +"de tampons `, mais sans vous donner de contrôle sur la durée " +"de vie des resources acquises lorsqu'un tampon est exporté." #: ../Doc/c-api/objbuffer.rst:15 msgid "" @@ -38,6 +44,10 @@ msgid "" "`PyArg_ParseTuple` family of functions) to get a buffer view over an object, " "and :c:func:`PyBuffer_Release` when the buffer view can be released." msgstr "" +"Il est donc recommandé d'appeler :c:func:`PyObject_GetBuffer` (ou les :ref:" +"`codes ` ``y*`` ou ``w*`` à la famille de fonctions :c:func:" +"`PyArg_ParseTuple`) pour obtenir une vue d'un tampon sur un objet, et :c:" +"func:`PyBuffer_Release` lorsque la vue peut être libérée." #: ../Doc/c-api/objbuffer.rst:23 msgid "" @@ -62,6 +72,8 @@ msgid "" "Returns ``1`` if *o* supports the single-segment readable buffer interface. " "Otherwise returns ``0``." msgstr "" +"Renvoie ``1`` si *o* gère l'interface *single-segment readable buffer*, " +"``0`` sinon." #: ../Doc/c-api/objbuffer.rst:47 msgid "" @@ -70,3 +82,8 @@ msgid "" "``0``, sets *buffer* to the memory location and *buffer_len* to the buffer " "length. Returns ``-1`` and sets a :exc:`TypeError` on error." msgstr "" +"Renvoie un pointeur vers un espace mémoire dans lequel il est possible " +"décrire. L'argument *obj* doit gérer l'interface *single-segment, character " +"buffer*. Si tout s'est bien passé, ``0`` est renvoyé, *buffer* pointe vers " +"l'espace mémoire, et *buffer_len* vaudra la taille du buffer. Renvoie ``-1`` " +"et met l'exception :exc:`TypeError` en cas d'erreur."