mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-24 13:45:05 +00:00
Fix more missed Py_ patterns - opcode, thread, exception
Fixed additional patterns: - _PyOpcode_* → _TyOpcode_* (all opcode metadata) - _PyUOpName → _TyUOpName - _PyFunction_* → _TyFunction_* - _PyListIterObject → _TyListIterObject - _Py_T_OBJECT → _Ty_T_OBJECT - Py_BEGIN_ALLOW_THREADS, Py_END_ALLOW_THREADS → Ty_* - PyDoc_STRVAR, PyDoc_STR → TyDoc_* - PyInterpreterState, PyThread_*, PyTime_t → Ty* - PyStructSequence_* → TyStructSequence_* - PyLockStatus → TyLockStatus - PyVarObject_HEAD_INIT → TyVarObject_HEAD_INIT - PyBaseExceptionObject → TyBaseExceptionObject - Fixed _PyExc_ → _TyExc_ in exception macros Build is progressing further. Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
20
Modules/_zstd/clinic/_zstdmodule.c.h
generated
20
Modules/_zstd/clinic/_zstdmodule.c.h
generated
@@ -9,7 +9,7 @@ preserve
|
||||
#include "pycore_abstract.h" // _PyNumber_Index()
|
||||
#include "pycore_modsupport.h" // _TyArg_CheckPositional()
|
||||
|
||||
PyDoc_STRVAR(_zstd_train_dict__doc__,
|
||||
TyDoc_STRVAR(_zstd_train_dict__doc__,
|
||||
"train_dict($module, samples_bytes, samples_sizes, dict_size, /)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
@@ -68,7 +68,7 @@ exit:
|
||||
return return_value;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_zstd_finalize_dict__doc__,
|
||||
TyDoc_STRVAR(_zstd_finalize_dict__doc__,
|
||||
"finalize_dict($module, custom_dict_bytes, samples_bytes, samples_sizes,\n"
|
||||
" dict_size, compression_level, /)\n"
|
||||
"--\n"
|
||||
@@ -145,7 +145,7 @@ exit:
|
||||
return return_value;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_zstd_get_param_bounds__doc__,
|
||||
TyDoc_STRVAR(_zstd_get_param_bounds__doc__,
|
||||
"get_param_bounds($module, /, parameter, is_compress)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
@@ -175,7 +175,7 @@ _zstd_get_param_bounds(TyObject *module, TyObject *const *args, Ty_ssize_t nargs
|
||||
Ty_hash_t ob_hash;
|
||||
TyObject *ob_item[NUM_KEYWORDS];
|
||||
} _kwtuple = {
|
||||
.ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_hash = -1,
|
||||
.ob_item = { &_Ty_ID(parameter), &_Ty_ID(is_compress), },
|
||||
};
|
||||
@@ -216,7 +216,7 @@ exit:
|
||||
return return_value;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_zstd_get_frame_size__doc__,
|
||||
TyDoc_STRVAR(_zstd_get_frame_size__doc__,
|
||||
"get_frame_size($module, /, frame_buffer)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
@@ -245,7 +245,7 @@ _zstd_get_frame_size(TyObject *module, TyObject *const *args, Ty_ssize_t nargs,
|
||||
Ty_hash_t ob_hash;
|
||||
TyObject *ob_item[NUM_KEYWORDS];
|
||||
} _kwtuple = {
|
||||
.ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_hash = -1,
|
||||
.ob_item = { &_Ty_ID(frame_buffer), },
|
||||
};
|
||||
@@ -285,7 +285,7 @@ exit:
|
||||
return return_value;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_zstd_get_frame_info__doc__,
|
||||
TyDoc_STRVAR(_zstd_get_frame_info__doc__,
|
||||
"get_frame_info($module, /, frame_buffer)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
@@ -313,7 +313,7 @@ _zstd_get_frame_info(TyObject *module, TyObject *const *args, Ty_ssize_t nargs,
|
||||
Ty_hash_t ob_hash;
|
||||
TyObject *ob_item[NUM_KEYWORDS];
|
||||
} _kwtuple = {
|
||||
.ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_hash = -1,
|
||||
.ob_item = { &_Ty_ID(frame_buffer), },
|
||||
};
|
||||
@@ -353,7 +353,7 @@ exit:
|
||||
return return_value;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_zstd_set_parameter_types__doc__,
|
||||
TyDoc_STRVAR(_zstd_set_parameter_types__doc__,
|
||||
"set_parameter_types($module, /, c_parameter_type, d_parameter_type)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
@@ -384,7 +384,7 @@ _zstd_set_parameter_types(TyObject *module, TyObject *const *args, Ty_ssize_t na
|
||||
Ty_hash_t ob_hash;
|
||||
TyObject *ob_item[NUM_KEYWORDS];
|
||||
} _kwtuple = {
|
||||
.ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_hash = -1,
|
||||
.ob_item = { &_Ty_ID(c_parameter_type), &_Ty_ID(d_parameter_type), },
|
||||
};
|
||||
|
||||
14
Modules/_zstd/clinic/compressor.c.h
generated
14
Modules/_zstd/clinic/compressor.c.h
generated
@@ -8,7 +8,7 @@ preserve
|
||||
#endif
|
||||
#include "pycore_modsupport.h" // _TyArg_UnpackKeywords()
|
||||
|
||||
PyDoc_STRVAR(_zstd_ZstdCompressor_new__doc__,
|
||||
TyDoc_STRVAR(_zstd_ZstdCompressor_new__doc__,
|
||||
"ZstdCompressor(level=None, options=None, zstd_dict=None)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
@@ -41,7 +41,7 @@ _zstd_ZstdCompressor_new(TyTypeObject *type, TyObject *args, TyObject *kwargs)
|
||||
Ty_hash_t ob_hash;
|
||||
TyObject *ob_item[NUM_KEYWORDS];
|
||||
} _kwtuple = {
|
||||
.ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_hash = -1,
|
||||
.ob_item = { &_Ty_ID(level), &_Ty_ID(options), &_Ty_ID(zstd_dict), },
|
||||
};
|
||||
@@ -95,7 +95,7 @@ exit:
|
||||
return return_value;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_zstd_ZstdCompressor_compress__doc__,
|
||||
TyDoc_STRVAR(_zstd_ZstdCompressor_compress__doc__,
|
||||
"compress($self, /, data, mode=ZstdCompressor.CONTINUE)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
@@ -129,7 +129,7 @@ _zstd_ZstdCompressor_compress(TyObject *self, TyObject *const *args, Ty_ssize_t
|
||||
Ty_hash_t ob_hash;
|
||||
TyObject *ob_item[NUM_KEYWORDS];
|
||||
} _kwtuple = {
|
||||
.ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_hash = -1,
|
||||
.ob_item = { &_Ty_ID(data), &_Ty_ID(mode), },
|
||||
};
|
||||
@@ -179,7 +179,7 @@ exit:
|
||||
return return_value;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_zstd_ZstdCompressor_flush__doc__,
|
||||
TyDoc_STRVAR(_zstd_ZstdCompressor_flush__doc__,
|
||||
"flush($self, /, mode=ZstdCompressor.FLUSH_FRAME)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
@@ -212,7 +212,7 @@ _zstd_ZstdCompressor_flush(TyObject *self, TyObject *const *args, Ty_ssize_t nar
|
||||
Ty_hash_t ob_hash;
|
||||
TyObject *ob_item[NUM_KEYWORDS];
|
||||
} _kwtuple = {
|
||||
.ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_hash = -1,
|
||||
.ob_item = { &_Ty_ID(mode), },
|
||||
};
|
||||
@@ -253,7 +253,7 @@ exit:
|
||||
return return_value;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_zstd_ZstdCompressor_set_pledged_input_size__doc__,
|
||||
TyDoc_STRVAR(_zstd_ZstdCompressor_set_pledged_input_size__doc__,
|
||||
"set_pledged_input_size($self, size, /)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
|
||||
10
Modules/_zstd/clinic/decompressor.c.h
generated
10
Modules/_zstd/clinic/decompressor.c.h
generated
@@ -9,7 +9,7 @@ preserve
|
||||
#include "pycore_abstract.h" // _PyNumber_Index()
|
||||
#include "pycore_modsupport.h" // _TyArg_UnpackKeywords()
|
||||
|
||||
PyDoc_STRVAR(_zstd_ZstdDecompressor_new__doc__,
|
||||
TyDoc_STRVAR(_zstd_ZstdDecompressor_new__doc__,
|
||||
"ZstdDecompressor(zstd_dict=None, options=None)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
@@ -40,7 +40,7 @@ _zstd_ZstdDecompressor_new(TyTypeObject *type, TyObject *args, TyObject *kwargs)
|
||||
Ty_hash_t ob_hash;
|
||||
TyObject *ob_item[NUM_KEYWORDS];
|
||||
} _kwtuple = {
|
||||
.ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_hash = -1,
|
||||
.ob_item = { &_Ty_ID(zstd_dict), &_Ty_ID(options), },
|
||||
};
|
||||
@@ -87,7 +87,7 @@ exit:
|
||||
return return_value;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_zstd_ZstdDecompressor_unused_data__doc__,
|
||||
TyDoc_STRVAR(_zstd_ZstdDecompressor_unused_data__doc__,
|
||||
"A bytes object of un-consumed input data.\n"
|
||||
"\n"
|
||||
"When ZstdDecompressor object stops after a frame is\n"
|
||||
@@ -116,7 +116,7 @@ _zstd_ZstdDecompressor_unused_data_get(TyObject *self, void *Py_UNUSED(context))
|
||||
return _zstd_ZstdDecompressor_unused_data_get_impl((ZstdDecompressor *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_zstd_ZstdDecompressor_decompress__doc__,
|
||||
TyDoc_STRVAR(_zstd_ZstdDecompressor_decompress__doc__,
|
||||
"decompress($self, /, data, max_length=-1)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
@@ -163,7 +163,7 @@ _zstd_ZstdDecompressor_decompress(TyObject *self, TyObject *const *args, Ty_ssiz
|
||||
Ty_hash_t ob_hash;
|
||||
TyObject *ob_item[NUM_KEYWORDS];
|
||||
} _kwtuple = {
|
||||
.ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_hash = -1,
|
||||
.ob_item = { &_Ty_ID(data), &_Ty_ID(max_length), },
|
||||
};
|
||||
|
||||
12
Modules/_zstd/clinic/zstddict.c.h
generated
12
Modules/_zstd/clinic/zstddict.c.h
generated
@@ -8,7 +8,7 @@ preserve
|
||||
#endif
|
||||
#include "pycore_modsupport.h" // _TyArg_UnpackKeywords()
|
||||
|
||||
PyDoc_STRVAR(_zstd_ZstdDict_new__doc__,
|
||||
TyDoc_STRVAR(_zstd_ZstdDict_new__doc__,
|
||||
"ZstdDict(dict_content, /, *, is_raw=False)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
@@ -41,7 +41,7 @@ _zstd_ZstdDict_new(TyTypeObject *type, TyObject *args, TyObject *kwargs)
|
||||
Ty_hash_t ob_hash;
|
||||
TyObject *ob_item[NUM_KEYWORDS];
|
||||
} _kwtuple = {
|
||||
.ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS)
|
||||
.ob_hash = -1,
|
||||
.ob_item = { &_Ty_ID(is_raw), },
|
||||
};
|
||||
@@ -93,7 +93,7 @@ exit:
|
||||
return return_value;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_zstd_ZstdDict_dict_content__doc__,
|
||||
TyDoc_STRVAR(_zstd_ZstdDict_dict_content__doc__,
|
||||
"The content of a Zstandard dictionary, as a bytes object.");
|
||||
#if defined(_zstd_ZstdDict_dict_content_DOCSTR)
|
||||
# undef _zstd_ZstdDict_dict_content_DOCSTR
|
||||
@@ -119,7 +119,7 @@ _zstd_ZstdDict_dict_content_get(TyObject *self, void *Py_UNUSED(context))
|
||||
return _zstd_ZstdDict_dict_content_get_impl((ZstdDict *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_zstd_ZstdDict_as_digested_dict__doc__,
|
||||
TyDoc_STRVAR(_zstd_ZstdDict_as_digested_dict__doc__,
|
||||
"Load as a digested dictionary to compressor.\n"
|
||||
"\n"
|
||||
"Pass this attribute as zstd_dict argument:\n"
|
||||
@@ -155,7 +155,7 @@ _zstd_ZstdDict_as_digested_dict_get(TyObject *self, void *Py_UNUSED(context))
|
||||
return _zstd_ZstdDict_as_digested_dict_get_impl((ZstdDict *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_zstd_ZstdDict_as_undigested_dict__doc__,
|
||||
TyDoc_STRVAR(_zstd_ZstdDict_as_undigested_dict__doc__,
|
||||
"Load as an undigested dictionary to compressor.\n"
|
||||
"\n"
|
||||
"Pass this attribute as zstd_dict argument:\n"
|
||||
@@ -189,7 +189,7 @@ _zstd_ZstdDict_as_undigested_dict_get(TyObject *self, void *Py_UNUSED(context))
|
||||
return _zstd_ZstdDict_as_undigested_dict_get_impl((ZstdDict *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_zstd_ZstdDict_as_prefix__doc__,
|
||||
TyDoc_STRVAR(_zstd_ZstdDict_as_prefix__doc__,
|
||||
"Load as a prefix to compressor/decompressor.\n"
|
||||
"\n"
|
||||
"Pass this attribute as zstd_dict argument:\n"
|
||||
|
||||
@@ -747,7 +747,7 @@ static TyMethodDef ZstdCompressor_methods[] = {
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
PyDoc_STRVAR(ZstdCompressor_last_mode_doc,
|
||||
TyDoc_STRVAR(ZstdCompressor_last_mode_doc,
|
||||
"The last mode used to this compressor object, its value can be .CONTINUE,\n"
|
||||
".FLUSH_BLOCK, .FLUSH_FRAME. Initialized to .FLUSH_FRAME.\n\n"
|
||||
"It can be used to get the current state of a compressor, such as, data\n"
|
||||
|
||||
@@ -656,11 +656,11 @@ static TyMethodDef ZstdDecompressor_methods[] = {
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
PyDoc_STRVAR(ZstdDecompressor_eof_doc,
|
||||
TyDoc_STRVAR(ZstdDecompressor_eof_doc,
|
||||
"True means the end of the first frame has been reached. If decompress data\n"
|
||||
"after that, an EOFError exception will be raised.");
|
||||
|
||||
PyDoc_STRVAR(ZstdDecompressor_needs_input_doc,
|
||||
TyDoc_STRVAR(ZstdDecompressor_needs_input_doc,
|
||||
"If the max_length output limit in .decompress() method has been reached,\n"
|
||||
"and the decompressor has (or may has) unconsumed input data, it will be set\n"
|
||||
"to False. In this case, passing b'' to the .decompress() method may output\n"
|
||||
|
||||
@@ -118,7 +118,7 @@ ZstdDict_dealloc(TyObject *ob)
|
||||
Ty_DECREF(tp);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(ZstdDict_dictid_doc,
|
||||
TyDoc_STRVAR(ZstdDict_dictid_doc,
|
||||
"the Zstandard dictionary, an int between 0 and 2**32.\n\n"
|
||||
"A non-zero value represents an ordinary Zstandard dictionary, "
|
||||
"conforming to the standardised format.\n\n"
|
||||
|
||||
Reference in New Issue
Block a user