@@ -12,7 +12,7 @@ msgid ""
1212msgstr ""
1313"Project-Id-Version :Python 3.10\n "
1414"Report-Msgid-Bugs-To :\n "
15- "POT-Creation-Date :2025-11-05 17:40 +0000\n "
15+ "POT-Creation-Date :2025-11-07 18:03 +0000\n "
1616"PO-Revision-Date :2025-09-22 15:57+0000\n "
1717"Last-Translator :Marcos Moraes, 2025\n "
1818"Language-Team :Portuguese (Brazil) (https://app.transifex.com/python-doc/ "
@@ -575,7 +575,7 @@ msgstr ""
575575"Em muitas plataformas chamar funções variádicas por meio do ctypes é "
576576"exatamente o mesmo que chamar funções com um número fixo de parâmetros. Em "
577577"algumas plataformas, em particular no ARM64 para plataformas Apple, a "
578- "convenção chamada para funções variádicas é diferente daquela usada para "
578+ "convençãode chamada para funções variádicas é diferente daquela usada para "
579579"funções regulares."
580580
581581#: ../../library/ctypes.rst:386
@@ -786,6 +786,8 @@ msgid ""
786786"Nested structures can also be initialized in the constructor in several "
787787"ways::"
788788msgstr ""
789+ "Estruturas aninhadas também podem ser inicializadas no construtor de várias "
790+ "maneiras::"
789791
790792#: ../../library/ctypes.rst:619
791793msgid ""
@@ -800,6 +802,11 @@ msgid ""
800802"guaranteed by the library to work in the general case. Unions and "
801803"structures with bit-fields should always be passed to functions by pointer."
802804msgstr ""
805+ "O :mod:`ctypes` não suporta passar uniões ou estruturas com campos de bits "
806+ "(bit-fields) para funções por valor. Embora isso possa funcionar em x86 de "
807+ "32 bits, não é garantido pela biblioteca que funcione no caso geral. Uniões "
808+ "e estruturas com campos de bits devem sempre ser passadas para funções por "
809+ "ponteiro."
803810
804811#: ../../library/ctypes.rst:639
805812msgid "Structure/union alignment and byte order"
@@ -825,7 +832,7 @@ msgstr ""
825832
826833#: ../../library/ctypes.rst:657
827834msgid "Bit fields in structures and unions"
828- msgstr ""
835+ msgstr "Campos de bit em estruturas e uniões "
829836
830837#: ../../library/ctypes.rst:659
831838msgid ""
@@ -843,32 +850,39 @@ msgid ""
843850"Arrays are sequences, containing a fixed number of instances of the same "
844851"type."
845852msgstr ""
853+ "Vetores são sequências, contendo um número fixo de instâncias do mesmo tipo."
846854
847855#: ../../library/ctypes.rst:681
848856msgid ""
849857"The recommended way to create array types is by multiplying a data type with "
850858"a positive integer::"
851859msgstr ""
860+ "A maneira recomendada de criar tipos vetor é multiplicando um tipo de dado "
861+ "por um inteiro positivo::"
852862
853863#: ../../library/ctypes.rst:686
854864msgid ""
855865"Here is an example of a somewhat artificial data type, a structure "
856866"containing 4 POINTs among other stuff::"
857867msgstr ""
868+ "Aqui está um exemplo de um tipo de dado um tanto artificial, uma estrutura "
869+ "contendo 4 POINTs entre outras coisas::"
858870
859871#: ../../library/ctypes.rst:702
860872msgid "Instances are created in the usual way, by calling the class::"
861- msgstr ""
873+ msgstr "Instâncias são criadas da maneira usual, chamando a classe:: "
862874
863875#: ../../library/ctypes.rst:708
864876msgid ""
865877"The above code print a series of ``0 0`` lines, because the array contents "
866878"is initialized to zeros."
867879msgstr ""
880+ "O código acima exibe uma série de linhas ``0 0``, pois o conteúdo do vetor é "
881+ "inicializado com zeros."
868882
869883#: ../../library/ctypes.rst:711
870884msgid "Initializers of the correct type can also be specified::"
871- msgstr ""
885+ msgstr "Inicializadores do tipo correto também podem ser especificados:: "
872886
873887#: ../../library/ctypes.rst:727
874888msgid "Pointers"
@@ -879,33 +893,43 @@ msgid ""
879893"Pointer instances are created by calling the :func:`pointer` function on a :"
880894"mod:`ctypes` type::"
881895msgstr ""
896+ "Instâncias de ponteiro são criadas chamando a função :func:`pointer` em um "
897+ "tipo :mod:`ctypes`::"
882898
883899#: ../../library/ctypes.rst:737
884900msgid ""
885901"Pointer instances have a :attr:`~_Pointer.contents` attribute which returns "
886902"the object to which the pointer points, the ``i`` object above::"
887903msgstr ""
904+ "Instâncias de ponteiros têm um atributo :attr:`~_Pointer.contents` que "
905+ "retorna o objeto para qual o ponteiro aponta, o objeto ``i`` acima::"
888906
889907#: ../../library/ctypes.rst:744
890908msgid ""
891909"Note that :mod:`ctypes` does not have OOR (original object return), it "
892910"constructs a new, equivalent object each time you retrieve an attribute::"
893911msgstr ""
912+ "Note que o :mod:`ctypes` não possui OOR (retorno de objeto original), ele "
913+ "constrói um objeto novo e equivalente cada vez que você recupera um "
914+ "atributo::"
894915
895916#: ../../library/ctypes.rst:753
896917msgid ""
897918"Assigning another :class:`c_int` instance to the pointer's contents "
898919"attribute would cause the pointer to point to the memory location where this "
899920"is stored::"
900921msgstr ""
922+ "Atribuir outra instância :class:`c_int` ao atributo do conteúdo do ponteiro "
923+ "faria com que o ponteiro apontasse para o local de memória onde ela está "
924+ "armazenada::"
901925
902926#: ../../library/ctypes.rst:765
903927msgid "Pointer instances can also be indexed with integers::"
904- msgstr ""
928+ msgstr "Instâncias de ponteiro também podem ser indexadas com inteiros:: "
905929
906930#: ../../library/ctypes.rst:771
907931msgid "Assigning to an integer index changes the pointed to value::"
908- msgstr ""
932+ msgstr "Atribuir a um índice inteiro altera o valor apontado:: "
909933
910934#: ../../library/ctypes.rst:780
911935msgid ""
@@ -915,6 +939,11 @@ msgid ""
915939"a C function, and you *know* that the pointer actually points to an array "
916940"instead of a single item."
917941msgstr ""
942+ "Também é possível usar índices diferentes de 0, mas você deve saber o que "
943+ "está fazendo, assim como em C: Você pode acessar ou alterar locais "
944+ "arbitrários da memória. Geralmente, você só usa este recurso se receber um "
945+ "ponteiro de uma função C, e você *sabe* que o ponteiro na verdade aponta "
946+ "para um vetor em vez de um único item."
918947
919948#: ../../library/ctypes.rst:786
920949msgid ""
@@ -923,18 +952,27 @@ msgid ""
923952"the :func:`POINTER` function, which accepts any :mod:`ctypes` type, and "
924953"returns a new type::"
925954msgstr ""
955+ "Nos bastidores, a função :func:`pointer` faz mais do que simplesmente criar "
956+ "instâncias de ponteiro, ela precisa criar *tipos* de ponteiro primeiro. Isso "
957+ "é feito com a função :func:`POINTER`, que aceita qualquer tipo :mod:"
958+ "`ctypes`, e retorna um novo tipo::"
926959
927960#: ../../library/ctypes.rst:802
928961msgid ""
929962"Calling the pointer type without an argument creates a ``NULL`` pointer. "
930963"``NULL`` pointers have a ``False`` boolean value::"
931964msgstr ""
965+ "Chamar o tipo ponteiro sem um argumento cria um ponteiro ``NULL``. Ponteiros "
966+ "``NULL`` possuem o valor booleano ``False``::"
932967
933968#: ../../library/ctypes.rst:810
934969msgid ""
935970":mod:`ctypes` checks for ``NULL`` when dereferencing pointers (but "
936971"dereferencing invalid non-\\ ``NULL`` pointers would crash Python)::"
937972msgstr ""
973+ "O :mod:`ctypes` verifica por ``NULL`` ao desreferenciar ponteiros (mas "
974+ "desreferenciar ponteiros inválidos que não sejam ``NULL`` travaria o "
975+ "Python)::"
938976
939977#: ../../library/ctypes.rst:829
940978msgid "Type conversions"
@@ -962,6 +1000,8 @@ msgstr ""
9621000#: ../../library/ctypes.rst:857
9631001msgid "To set a POINTER type field to ``NULL``, you can assign ``None``::"
9641002msgstr ""
1003+ "Para definir um campo do tipo PONTEIRO como ``NULL``, você pode atribuir "
1004+ "``None``::"
9651005
9661006#: ../../library/ctypes.rst:864
9671007msgid ""
@@ -971,6 +1011,11 @@ msgid ""
9711011"accepts ``POINTER(c_int)`` pointers or :class:`c_int` arrays for its "
9721012"``values`` field, but not instances of other types::"
9731013msgstr ""
1014+ "Às vezes, você tem instâncias de tipos incompatíveis. Em C, você pode "
1015+ "converter um tipo em outro tipo. O :mod:`ctypes` fornece uma função :func:"
1016+ "`cast` que pode ser usada da mesma maneira. A estrutura ``Bar`` definida "
1017+ "acima aceita ponteiros ``POINTER(c_int)`` ou vetores :class:`c_int` para seu "
1018+ "campo ``values``, mas não instâncias de outros tipos::"
9741019
9751020#: ../../library/ctypes.rst:876
9761021msgid "For these cases, the :func:`cast` function is handy."