66# Translators:
77# python-doc bot, 2025
88# Rafael Fontenelle <rffontenelle@gmail.com>, 2025
9+ # Marcos Moraes, 2025
910#
1011#, fuzzy
1112msgid ""
1213msgstr ""
1314"Project-Id-Version :Python 3.13\n "
1415"Report-Msgid-Bugs-To :\n "
15- "POT-Creation-Date :2025-09-17 03:50 +0000\n "
16+ "POT-Creation-Date :2025-11-03 15:10 +0000\n "
1617"PO-Revision-Date :2025-09-15 01:04+0000\n "
17- "Last-Translator :Rafael Fontenelle <rffontenelle@gmail.com> , 2025\n "
18+ "Last-Translator :Marcos Moraes , 2025\n "
1819"Language-Team :Portuguese (Brazil) (https://app.transifex.com/python-doc/ "
1920"teams/5390/pt_BR/)\n "
2021"Language :pt_BR\n "
@@ -972,6 +973,10 @@ msgid ""
972973"bytes objects have to be wrapped in their corresponding :mod:`ctypes` type, "
973974"so that they can be converted to the required C data type::"
974975msgstr ""
976+ "Como mencionado anteriormente, todos os tipos do Python, exceto inteiros, "
977+ "strings e objetos bytes, precisam ser encapsulados em seu tipo "
978+ "correspondente de :mod:`ctypes`, para que possam ser convertidos para o tipo "
979+ "de dado C necessário."
975980
976981#: ../../library/ctypes.rst:387
977982msgid ""
@@ -993,12 +998,19 @@ msgid ""
993998"convention for variadic functions is different than that for regular "
994999"functions."
9951000msgstr ""
1001+ "Em muitas plataformas chamar funções variádicas por meio do ctypes é "
1002+ "exatamente o mesmo que chamar funções com um número fixo de parâmetros. Em "
1003+ "algumas plataformas, em particular no ARM64 para plataformas Apple, a "
1004+ "convenção chamada para funções variádicas é diferente daquela usada para "
1005+ "funções regulares."
9961006
9971007#: ../../library/ctypes.rst:402
9981008msgid ""
9991009"On those platforms it is required to specify the :attr:`~_CFuncPtr.argtypes` "
10001010"attribute for the regular, non-variadic, function arguments:"
10011011msgstr ""
1012+ "Nessas plataformas é necessário especificar o atributo :attr:`~_CFuncPtr."
1013+ "argtypes` para os argumentos de função regulares (não variádicos):"
10021014
10031015#: ../../library/ctypes.rst:405
10041016msgid "libc.printf.argtypes = [ctypes.c_char_p]"
@@ -1009,10 +1021,13 @@ msgid ""
10091021"Because specifying the attribute does not inhibit portability it is advised "
10101022"to always specify :attr:`~_CFuncPtr.argtypes` for all variadic functions."
10111023msgstr ""
1024+ "Já que especificar o atributo não impede a portabilidade, recomenda-se "
1025+ "sempre especificar o :attr:`~_CFuncPtr.argtypes` para todas as funções "
1026+ "variádicas."
10121027
10131028#: ../../library/ctypes.rst:416
10141029msgid "Calling functions with your own custom data types"
1015- msgstr ""
1030+ msgstr "Chamando funções com seus próprios tipos de dados personalizados "
10161031
10171032#: ../../library/ctypes.rst:418
10181033msgid ""
@@ -1022,6 +1037,12 @@ msgid ""
10221037"The attribute must be an integer, string, bytes, a :mod:`ctypes` instance, "
10231038"or an object with an :attr:`!_as_parameter_` attribute::"
10241039msgstr ""
1040+ "Você também pode personalizar a conversão de argumentos do :mod:`ctypes` "
1041+ "para permitir que instâncias das suas próprias classes sejam usadas como "
1042+ "argumento de função. O :mod:`ctypes` procura um atributo :attr:`!"
1043+ "_as_parameter_` e o utiliza como o argumento da função. O atributo deve ser "
1044+ "um inteiro, string, bytes, uma instância de :mod:`ctypes`, ou um objeto com "
1045+ "um atributo :attr:`!_as_parameter_`:: "
10251046
10261047#: ../../library/ctypes.rst:424
10271048msgid ""
@@ -1042,16 +1063,22 @@ msgid ""
10421063"_as_parameter_` instance variable, you could define a :class:`property` "
10431064"which makes the attribute available on request."
10441065msgstr ""
1066+ "Se você não quiser armazenar os dados da instância na variável de instância :"
1067+ "attr:`!_as_parameter_`, você pode definir uma :class:`property` que "
1068+ "disponibilize o atributo mediante solicitação."
10451069
10461070#: ../../library/ctypes.rst:442
10471071msgid "Specifying the required argument types (function prototypes)"
10481072msgstr ""
1073+ "Especificando os tipos de argumentos necessários (protótipos de função)"
10491074
10501075#: ../../library/ctypes.rst:444
10511076msgid ""
10521077"It is possible to specify the required argument types of functions exported "
10531078"from DLLs by setting the :attr:`~_CFuncPtr.argtypes` attribute."
10541079msgstr ""
1080+ "É possível especificar os tipos de argumentos necessários de funções "
1081+ "exportadas de DLLs definindo o atributo :attr:`~_CFuncPtr.argtypes`."
10551082
10561083#: ../../library/ctypes.rst:447
10571084msgid ""
@@ -1061,6 +1088,11 @@ msgid ""
10611088"string, on the other hand this is quite handy to experiment with this "
10621089"feature)::"
10631090msgstr ""
1091+ ":attr:`~_CFuncPtr.argtypes` deve ser uma sequência de tipos de dados C (a "
1092+ "função :func:`!printf` provavelmente não é um bom exemplo nesse caso, pois "
1093+ "ela aceita um número variável e diferentes tipos de parâmetros dependendo da "
1094+ "string de formato; por outro lado, ela é bastante útil para experimentar "
1095+ "esse recurso)::"
10641096
10651097#: ../../library/ctypes.rst:452
10661098msgid ""
@@ -1077,6 +1109,9 @@ msgid ""
10771109"prototype for a C function), and tries to convert the arguments to valid "
10781110"types::"
10791111msgstr ""
1112+ "Especificar um formato protege contra tipos de argumentos incompatíveis "
1113+ "(assim como um protótipo para uma função em C), e tenta converter os "
1114+ "argumentos para tipos válidos::"
10801115
10811116#: ../../library/ctypes.rst:461
10821117msgid ""
@@ -1104,6 +1139,16 @@ msgid ""
11041139"bytes, a :mod:`ctypes` instance, or an object with an :attr:`!"
11051140"_as_parameter_` attribute."
11061141msgstr ""
1142+ "Se você definiu suas próprias classes que serão passadas em chamadas de "
1143+ "função, é necessário implementar um método de classe :meth:`~_CData."
1144+ "from_param` para que elas possam ser usadas na sequência :attr:`~_CFuncPtr."
1145+ "argtypes`. O método de classe :meth:`~_CData.from_param` recebe o objeto "
1146+ "Python passado para a chamada de função; ele deve realizar um typecheck ou o "
1147+ "que for necessário para garantir que esse objeto seja aceitável, e então "
1148+ "retornar o próprio objeto, seu atributo :attr:`!_as_parameter_` ou qualquer "
1149+ "valor que você queira passar como argumento da função C nesse caso. "
1150+ "Novamente, o resultado deve ser um inteiro, string, bytes, uma instância de :"
1151+ "mod:`ctypes` ou um objeto com um atributo :attr:`!_as_parameter_`. "
11071152
11081153#: ../../library/ctypes.rst:484
11091154msgid "Return types"
@@ -1115,13 +1160,19 @@ msgid ""
11151160"return types can be specified by setting the :attr:`~_CFuncPtr.restype` "
11161161"attribute of the function object."
11171162msgstr ""
1163+ "Por padrão, as funções são presumidas como retornando o tipo C :c:expr:"
1164+ "`int`. Outros retornos podem ser especificados definindo o atributo :attr:"
1165+ "`~_CFuncPtr.restype` do objeto função."
11181166
11191167#: ../../library/ctypes.rst:498
11201168msgid ""
11211169"The C prototype of :c:func:`time` is ``time_t time(time_t *)``. Because :c:"
11221170"type:`time_t` might be of a different type than the default return type :c:"
11231171"expr:`int`, you should specify the :attr:`!restype` attribute::"
11241172msgstr ""
1173+ "O protótipo C de :c:func:`time` é ``time_t time(time_t *)``. Pois :c:type:"
1174+ "`time_t` pode ser de um tipo diferente do tipo de retorno padrão :c:expr:"
1175+ "`int`, você deve especificar o atributo :attr:`!restype`."
11251176
11261177#: ../../library/ctypes.rst:502
11271178msgid ">>> libc.time.restype = c_time_t"
@@ -1130,6 +1181,8 @@ msgstr ""
11301181#: ../../library/ctypes.rst:504
11311182msgid "The argument types can be specified using :attr:`~_CFuncPtr.argtypes`::"
11321183msgstr ""
1184+ "Os tipos de argumentos podem ser especificados usando :attr:`~_CFuncPtr."
1185+ "argtypes`::"
11331186
11341187#: ../../library/ctypes.rst:506
11351188msgid ">>> libc.time.argtypes = (POINTER(c_time_t),)"
@@ -1140,6 +1193,8 @@ msgid ""
11401193"To call the function with a ``NULL`` pointer as first argument, use "
11411194"``None``::"
11421195msgstr ""
1196+ "Para chamar uma função com um ponteiro ``NULL`` como primeiro argumento, use "
1197+ "``None``::"
11431198
11441199#: ../../library/ctypes.rst:510
11451200msgid ""
@@ -1152,6 +1207,9 @@ msgid ""
11521207"Here is a more advanced example, it uses the :func:`!strchr` function, which "
11531208"expects a string pointer and a char, and returns a pointer to a string::"
11541209msgstr ""
1210+ "Aqui está um exemplo mais avançado, ele usa a função :func:`!strchr`, que "
1211+ "espera um ponteiro de string e um char, e retorna um ponteiro para uma "
1212+ "string::"
11551213
11561214#: ../../library/ctypes.rst:516
11571215msgid ""
@@ -1234,6 +1292,9 @@ msgid ""
12341292"through the :attr:`~_CFuncPtr.errcheck` attribute; see the reference manual "
12351293"for details."
12361294msgstr ""
1295+ "Por favor, repare que um mecanismo de checagem de erro muito mais poderoso "
1296+ "está disponível através do atributo :attr:`~_CFuncPtr.errcheck`; consulte o "
1297+ "manual de referência para mais detalhes."
12371298
12381299#: ../../library/ctypes.rst:581
12391300msgid "Passing pointers (or: passing parameters by reference)"