Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion 3 Modules/_threadmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1171,8 +1171,9 @@ This function is meant for internal and specialized purposes only.\n\
In most applications `threading.enumerate()` should be used instead.");

static void
release_sentinel(void *wr)
release_sentinel(void *wr_raw)
{
PyObject *wr = _PyObject_CAST(wr_raw);
/* Tricky: this function is called when the current thread state
is being deleted. Therefore, only simple C code can safely
execute here. */
Expand Down
9 changes: 5 additions & 4 deletions 9 Modules/gcmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1847,20 +1847,21 @@ _PyGC_Dump(PyGC_Head *g)
functions must always be available */

void
PyObject_GC_Track(void *op)
PyObject_GC_Track(void *op_raw)
{
PyObject *obj = (PyObject *)op;
PyObject *op = _PyObject_CAST(op_raw);
if (_PyObject_GC_IS_TRACKED(op)) {
_PyObject_ASSERT_FAILED_MSG(op,
"object already tracked "
"by the garbage collector");
}
_PyObject_GC_TRACK(obj);
_PyObject_GC_TRACK(op);
}

void
PyObject_GC_UnTrack(void *op)
PyObject_GC_UnTrack(void *op_raw)
{
PyObject *op = _PyObject_CAST(op_raw);
/* Obscure: the Py_TRASHCAN mechanism requires that we be able to
* call PyObject_GC_UnTrack twice on an object.
*/
Expand Down
9 changes: 6 additions & 3 deletions 9 Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1171,14 +1171,17 @@ unicode_kind_name(PyObject *unicode)

#ifdef Py_DEBUG
/* Functions wrapping macros for use in debugger */
char *_PyUnicode_utf8(void *unicode){
char *_PyUnicode_utf8(void *unicode_raw){
PyObject *unicode = _PyObject_CAST(unicode_raw);
return PyUnicode_UTF8(unicode);
}

void *_PyUnicode_compact_data(void *unicode) {
void *_PyUnicode_compact_data(void *unicode_raw) {
PyObject *unicode = _PyObject_CAST(unicode_raw);
return _PyUnicode_COMPACT_DATA(unicode);
}
void *_PyUnicode_data(void *unicode){
void *_PyUnicode_data(void *unicode_raw) {
PyObject *unicode = _PyObject_CAST(unicode_raw);
printf("obj %p\n", unicode);
printf("compact %d\n", PyUnicode_IS_COMPACT(unicode));
printf("compact ascii %d\n", PyUnicode_IS_COMPACT_ASCII(unicode));
Expand Down
7 changes: 4 additions & 3 deletions 7 Python/hamt.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,11 @@ hamt_node_collision_count(PyHamtNode_Collision *node);

#ifdef Py_DEBUG
static void
_hamt_node_array_validate(void *o)
_hamt_node_array_validate(void *obj_raw)
{
assert(IS_ARRAY_NODE(o));
PyHamtNode_Array *node = (PyHamtNode_Array*)(o);
PyObject *obj = _PyObject_CAST(obj_raw);
assert(IS_ARRAY_NODE(obj));
PyHamtNode_Array *node = (PyHamtNode_Array*)obj;
Py_ssize_t i = 0, count = 0;
for (; i < HAMT_ARRAY_NODE_SIZE; i++) {
if (node->a_array[i] != NULL) {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.