Skip to content

Use y* instead of y# #6975

@Yay295

Description

@Yay295

#6974 changed

if (!PyArg_ParseTuple(args, "y#", &buffer, &bufsize)) {
to use y* instead of y# so that it can accept a memoryview object, and notes that y* is actually the recommended way to accept binary data. y# is used in a few other locations; should these be changed as well?

if (!PyArg_ParseTuple(args, "y#:frombytes", &ptr, &bytes)) {

"y#(ii)(iiii):_load",

"ss|nnny#",

"ss|nnnnnnnnOz#y#y#",

if (!PyArg_ParseTuple(args, "sy#", &rawmode, &palette, &palettesize)) {

if (!PyArg_ParseTuple(args, "y#", &values, &length)) {

"y#y#",

args, "O!y#", &Imaging_Type, &imagep, &glyphdata, &glyphdata_length)) {

if (!PyArg_ParseTuple(args, "y#:profile_frombytes", &pProfile, &nProfile)) {

"etn|nsy#n",

list_name = Py_BuildValue("y#", name.string, name.string_len);

axis_name = Py_BuildValue("y#", name.string, name.string_len);

"y#iiifss#iis#s#",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions