[pypy-commit] pypy vmprof-native: add brackets to if statement, swap variable names
plan_rich
pypy.commits at gmail.com
Tue Feb 7 09:48:27 EST 2017
Author: Richard Plangger <planrichi at gmail.com>
Branch: vmprof-native
Changeset: r90000:c7f8f45b5a55
Date: 2017-02-07 15:47 +0100
http://bitbucket.org/pypy/pypy/changeset/c7f8f45b5a55/
Log: add brackets to if statement, swap variable names
diff --git a/rpython/rlib/rvmprof/src/shared/vmprof_common.h b/rpython/rlib/rvmprof/src/shared/vmprof_common.h
--- a/rpython/rlib/rvmprof/src/shared/vmprof_common.h
+++ b/rpython/rlib/rvmprof/src/shared/vmprof_common.h
@@ -169,8 +169,9 @@
#else
intptr_t pc = ucontext ? (intptr_t)GetPC((ucontext_t *)ucontext) : 0;
#endif
- if (stack == NULL)
+ if (stack == NULL) {
stack = get_vmprof_stack();
+ }
n = get_stack_trace(stack, result_p, result_length - 2, pc);
return (intptr_t)n;
}
diff --git a/rpython/rlib/rvmprof/src/shared/vmprof_main.h b/rpython/rlib/rvmprof/src/shared/vmprof_main.h
--- a/rpython/rlib/rvmprof/src/shared/vmprof_main.h
+++ b/rpython/rlib/rvmprof/src/shared/vmprof_main.h
@@ -94,7 +94,7 @@
PY_STACK_FRAME_T * frame;
#ifdef RPYTHON_VMPROF
// do nothing here,
- current = (PY_STACK_FRAME_T*)frame;
+ frame = (PY_STACK_FRAME_T*)current;
#else
if (!current) {
return 0;
More information about the pypy-commit
mailing list