Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–85 unchanged (85 lines)
86 it != self->classes_by_descriptor->end(); ++it) {
87 Py_CLEAR(it->second);
88 }
89 delete self->classes_by_descriptor;
90 delete self->message_factory;
91 Py_CLEAR(self->pool);
92 Py_TYPE(self)->tp_free(pself);
93}
94
95static int GcTraverse(PyObject* pself, visitproc visit, void* arg) {
96 PyMessageFactory* self = reinterpret_cast<PyMessageFactory*>(pself);
97 Py_VISIT(self->pool);
98 for (const auto& desc_and_class : *self->classes_by_descriptor) {
…lines 99–278 unchanged (180 lines)

After

…lines 1–85 unchanged (85 lines)
86 it != self->classes_by_descriptor->end(); ++it) {
87 Py_CLEAR(it->second);
88 }
89 delete self->classes_by_descriptor;
90 delete self->message_factory;
91 Py_CLEAR(self->pool);
92 PyObject_GC_UnTrack(pself);
93 Py_TYPE(self)->tp_free(pself);
94}
95
96static int GcTraverse(PyObject* pself, visitproc visit, void* arg) {
97 PyMessageFactory* self = reinterpret_cast<PyMessageFactory*>(pself);
98 Py_VISIT(self->pool);
…lines 99–279 unchanged (181 lines)

Before

translation_unit
comment "// Protocol Buffers - Google's data interchange format"
comment "// Copyright 2008 Google Inc. All rights reserved."
comment "//"
comment "// Use of this source code is governed by a BSD-style"
comment "// license that can be found in the LICENSE file or at"
comment "// https://developers.google.com/open-source/licenses/bsd"
preproc_include
#include "#include"
system_lib_string "<unordered_map>"
preproc_include
#include "#include"
system_lib_string "<utility>"
preproc_def
#define "#define"
identifier "PY_SSIZE_T_CLEAN"
preproc_include
#include "#include"
system_lib_string "<Python.h>"
preproc_include
#include "#include"
string_literal
" "\""
string_content "google/protobuf/dynamic_message.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "google/protobuf/pyext/descriptor.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "google/protobuf/pyext/message.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "google/protobuf/pyext/message_factory.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "google/protobuf/pyext/scoped_pyobject_ptr.h"
" "\""
preproc_function_def
#define "#define"
identifier "PyString_AsStringAndSize"
preproc_params
( "("
identifier "ob"
, ","
identifier "charpp"
, ","
identifier "sizep"
) ")"
preproc_arg "(PyUnicode_Check(ob) "...
namespace_definition
namespace "namespace"
namespace_identifier "google"
declaration_list
{ "{"
namespace_definition
namespace "namespace"
namespace_identifier "protobuf"
declaration_list
{ "{"
namespace_definition
namespace "namespace"
namespace_identifier "python"
declaration_list
{ "{"
namespace_definition
namespace "namespace"
namespace_identifier "message_factory"
declaration_list
{ "{"
function_definition (+143 nodes collapsed)
function_definition (+289 nodes collapsed)
function_definition
storage_class_specifier
static "static"
primitive_type "void"
function_declarator
identifier "Dealloc"
parameter_list
( "("
parameter_declaration
type_identifier "PyObject"
pointer_declarator
* "*"
identifier "pself"
) ")"
compound_statement
{ "{"
declaration (+22 nodes collapsed)
type_definition
typedef "typedef"
qualified_identifier
namespace_identifier "PyMessageFactory"
:: "::"
qualified_identifier
namespace_identifier "ClassesByMessageMap"
:: "::"
type_identifier "iterator"
type_identifier "iterator"
; ";"
for_statement (+53 nodes collapsed)
expression_statement
delete_expression
delete "delete"
field_expression
identifier "self"
-> "->"
field_identifier "classes_by_descriptor"
; ";"
expression_statement
delete_expression
delete "delete"
field_expression
identifier "self"
-> "->"
field_identifier "message_factory"
; ";"
expression_statement
call_expression
identifier "Py_CLEAR"
argument_list
( "("
field_expression
identifier "self"
-> "->"
field_identifier "pool"
) ")"
; ";"
expression_statement
call_expression
field_expression
call_expression
identifier "Py_TYPE"
argument_list
( "("
identifier "self"
) ")"
-> "->"
field_identifier "tp_free"
argument_list
( "("
identifier "pself"
) ")"
; ";"
} "}"
function_definition (+96 nodes collapsed)
function_definition (+75 nodes collapsed)
comment "// Add a message class to our database."
function_definition (+133 nodes collapsed)
function_definition (+550 nodes collapsed)
comment "// Retrieve the message class added to our database."
function_definition (+130 nodes collapsed)
declaration
storage_class_specifier
static "static"
type_identifier "PyMethodDef"
init_declarator
array_declarator
identifier "Methods"
[ "["
] "]"
= "="
initializer_list
{ "{"
initializer_list
{ "{"
null
nullptr "nullptr"
} "}"
, ","
} "}"
; ";"
function_definition (+56 nodes collapsed)
declaration (+43 nodes collapsed)
} "}"
comment "// namespace message_factory"
declaration (+258 nodes collapsed)
} "}"
comment "// namespace protobuf"
} "}"
comment "// namespace google"
} ""

After

translation_unit
comment "// Protocol Buffers - Google's data interchange format"
comment "// Copyright 2008 Google Inc. All rights reserved."
comment "//"
comment "// Use of this source code is governed by a BSD-style"
comment "// license that can be found in the LICENSE file or at"
comment "// https://developers.google.com/open-source/licenses/bsd"
preproc_include
#include "#include"
system_lib_string "<unordered_map>"
preproc_include
#include "#include"
system_lib_string "<utility>"
preproc_def
#define "#define"
identifier "PY_SSIZE_T_CLEAN"
preproc_include
#include "#include"
system_lib_string "<Python.h>"
preproc_include
#include "#include"
string_literal
" "\""
string_content "google/protobuf/dynamic_message.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "google/protobuf/pyext/descriptor.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "google/protobuf/pyext/message.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "google/protobuf/pyext/message_factory.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "google/protobuf/pyext/scoped_pyobject_ptr.h"
" "\""
preproc_function_def
#define "#define"
identifier "PyString_AsStringAndSize"
preproc_params
( "("
identifier "ob"
, ","
identifier "charpp"
, ","
identifier "sizep"
) ")"
preproc_arg "(PyUnicode_Check(ob) "...
namespace_definition
namespace "namespace"
namespace_identifier "google"
declaration_list
{ "{"
namespace_definition
namespace "namespace"
namespace_identifier "protobuf"
declaration_list
{ "{"
namespace_definition
namespace "namespace"
namespace_identifier "python"
declaration_list
{ "{"
namespace_definition
namespace "namespace"
namespace_identifier "message_factory"
declaration_list
{ "{"
function_definition (+143 nodes collapsed)
function_definition (+289 nodes collapsed)
function_definition
storage_class_specifier
static "static"
primitive_type "void"
function_declarator
identifier "Dealloc"
parameter_list
( "("
parameter_declaration
type_identifier "PyObject"
pointer_declarator
* "*"
identifier "pself"
) ")"
compound_statement
{ "{"
declaration (+22 nodes collapsed)
type_definition
typedef "typedef"
qualified_identifier
namespace_identifier "PyMessageFactory"
:: "::"
qualified_identifier
namespace_identifier "ClassesByMessageMap"
:: "::"
type_identifier "iterator"
type_identifier "iterator"
; ";"
for_statement (+53 nodes collapsed)
expression_statement
delete_expression
delete "delete"
field_expression
identifier "self"
-> "->"
field_identifier "classes_by_descriptor"
; ";"
expression_statement
delete_expression
delete "delete"
field_expression
identifier "self"
-> "->"
field_identifier "message_factory"
; ";"
expression_statement
call_expression
identifier "Py_CLEAR"
argument_list
( "("
field_expression
identifier "self"
-> "->"
field_identifier "pool"
) ")"
; ";"
expression_statement
call_expression
identifier "PyObject_GC_UnTrack"
argument_list
( "("
identifier "pself"
) ")"
; ";"
expression_statement
call_expression
field_expression
call_expression
identifier "Py_TYPE"
argument_list
( "("
identifier "self"
) ")"
-> "->"
field_identifier "tp_free"
argument_list
( "("
identifier "pself"
) ")"
; ";"
} "}"
function_definition (+96 nodes collapsed)
function_definition (+75 nodes collapsed)
comment "// Add a message class to our database."
function_definition (+133 nodes collapsed)
function_definition (+550 nodes collapsed)
comment "// Retrieve the message class added to our database."
function_definition (+130 nodes collapsed)
declaration
storage_class_specifier
static "static"
type_identifier "PyMethodDef"
init_declarator
array_declarator
identifier "Methods"
[ "["
] "]"
= "="
initializer_list
{ "{"
initializer_list
{ "{"
null
nullptr "nullptr"
} "}"
, ","
} "}"
; ";"
function_definition (+56 nodes collapsed)
declaration (+43 nodes collapsed)
} "}"
comment "// namespace message_factory"
declaration (+258 nodes collapsed)
} "}"
comment "// namespace protobuf"
} "}"
comment "// namespace google"
} ""