Skip to content

Commit

Permalink
Fix trace messages
Browse files Browse the repository at this point in the history
Removed redundant '%' in trace output of `this` pointer in code generator's write method.

Pull request #33
  • Loading branch information
JezaChen authored and philthompson10 committed Dec 5, 2024
1 parent 10cb0c2 commit 132b012
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sipbuild/generator/outputs/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -3810,7 +3810,7 @@ def _shadow_code(sf, spec, bindings, klass):
args = fmt_signature_as_cpp_declaration(spec, ctor.cpp_signature,
scope=klass.iface_file)

sf.write(f' sipTrace(SIP_TRACE_CTORS, "sip{klass_name}::sip{klass_name}({args}){throw_specifier} (this=0x%%08x)\\n", this);\n\n')
sf.write(f' sipTrace(SIP_TRACE_CTORS, "sip{klass_name}::sip{klass_name}({args}){throw_specifier} (this=0x%08x)\\n", this);\n\n')

if nr_virtuals > 0:
sf.write(' memset(sipPyMethods, 0, sizeof (sipPyMethods));\n')
Expand All @@ -3824,7 +3824,7 @@ def _shadow_code(sf, spec, bindings, klass):
sf.write(f'\nsip{klass_name}::~sip{klass_name}(){throw_specifier}\n{{\n')

if bindings.tracing:
sf.write(f' sipTrace(SIP_TRACE_DTORS, "sip{klass_name}::~sip{klass_name}(){throw_specifier} (this=0x%%08x)\\n", this);\n\n')
sf.write(f' sipTrace(SIP_TRACE_DTORS, "sip{klass_name}::~sip{klass_name}(){throw_specifier} (this=0x%08x)\\n", this);\n\n')

if klass.dtor_virtual_catcher_code is not None:
sf.write_code(klass.dtor_virtual_catcher_code)
Expand Down Expand Up @@ -3940,7 +3940,7 @@ def _virtual_catcher(sf, spec, bindings, klass, virtual_overload, virt_nr):
if bindings.tracing:
args = fmt_signature_as_cpp_declaration(spec, overload.cpp_signature,
scope=klass.iface_file)
sf.write(f' sipTrace(SIP_TRACE_CATCHERS, "{result_type} sip{klass_name}::{overload_cpp_name}({args}){const}{throw_specifier} (this=0x%%08x)\\n", this);\n\n')
sf.write(f' sipTrace(SIP_TRACE_CATCHERS, "{result_type} sip{klass_name}::{overload_cpp_name}({args}){const}{throw_specifier} (this=0x%08x)\\n", this);\n\n')

_restore_protections(protection_state)

Expand Down

0 comments on commit 132b012

Please sign in to comment.