Skip to content
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix DTrace build issues on FreeBSD. Patch by David Carlier.
6 changes: 3 additions & 3 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -5458,7 +5458,7 @@ dtrace_function_entry(PyFrameObject *f)
funcname = PyUnicode_AsUTF8(f->f_code->co_name);
lineno = PyCode_Addr2Line(f->f_code, f->f_lasti);

PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno);
PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno);
}

static void
Expand All @@ -5472,7 +5472,7 @@ dtrace_function_return(PyFrameObject *f)
funcname = PyUnicode_AsUTF8(f->f_code->co_name);
lineno = PyCode_Addr2Line(f->f_code, f->f_lasti);

PyDTrace_FUNCTION_RETURN(filename, funcname, lineno);
PyDTrace_FUNCTION_RETURN((char *)filename, (char *)funcname, lineno);
}

/* DTrace equivalent of maybe_call_line_trace. */
Expand Down Expand Up @@ -5504,7 +5504,7 @@ maybe_dtrace_line(PyFrameObject *frame,
co_name = PyUnicode_AsUTF8(frame->f_code->co_name);
if (!co_name)
co_name = "?";
PyDTrace_LINE(co_filename, co_name, line);
PyDTrace_LINE((char *)co_filename, (char *)co_name, line);
}
*instr_prev = frame->f_lasti;
}
Expand Down
4 changes: 2 additions & 2 deletions Python/import.c
Original file line number Diff line number Diff line change
Expand Up @@ -1762,14 +1762,14 @@ import_find_and_load(PyThreadState *tstate, PyObject *abs_name)
}

if (PyDTrace_IMPORT_FIND_LOAD_START_ENABLED())
PyDTrace_IMPORT_FIND_LOAD_START(PyUnicode_AsUTF8(abs_name));
PyDTrace_IMPORT_FIND_LOAD_START((char *)PyUnicode_AsUTF8(abs_name));

mod = _PyObject_CallMethodIdObjArgs(interp->importlib,
&PyId__find_and_load, abs_name,
interp->import_func, NULL);

if (PyDTrace_IMPORT_FIND_LOAD_DONE_ENABLED())
PyDTrace_IMPORT_FIND_LOAD_DONE(PyUnicode_AsUTF8(abs_name),
PyDTrace_IMPORT_FIND_LOAD_DONE((char *)PyUnicode_AsUTF8(abs_name),
mod != NULL);

if (import_time) {
Expand Down
2 changes: 1 addition & 1 deletion Python/sysmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ PySys_Audit(const char *event, const char *argFormat, ...)

/* Dtrace USDT point */
if (dtrace) {
PyDTrace_AUDIT(event, (void *)eventArgs);
PyDTrace_AUDIT((char *)event, (void *)eventArgs);
}

/* Call interpreter hooks */
Expand Down
3 changes: 1 addition & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -11362,7 +11362,6 @@ $as_echo "$with_dtrace" >&6; }


DTRACE=
DFLAGS=
DTRACE_HEADERS=
DTRACE_OBJS=

Expand Down Expand Up @@ -11428,7 +11427,7 @@ if ${ac_cv_dtrace_link+:} false; then :
else
ac_cv_dtrace_link=no
echo 'BEGIN{}' > conftest.d
"$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
"$DTRACE" "$DFLAGS" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
ac_cv_dtrace_link=yes

fi
Expand Down
3 changes: 1 addition & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3473,7 +3473,6 @@ AC_SUBST(DFLAGS)
AC_SUBST(DTRACE_HEADERS)
AC_SUBST(DTRACE_OBJS)
DTRACE=
DFLAGS=
DTRACE_HEADERS=
DTRACE_OBJS=

Expand All @@ -3494,7 +3493,7 @@ then
[ac_cv_dtrace_link], [dnl
ac_cv_dtrace_link=no
echo 'BEGIN{}' > conftest.d
"$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
"$DTRACE" "$DFLAGS" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
ac_cv_dtrace_link=yes
])
if test "$ac_cv_dtrace_link" = "yes"; then
Expand Down