File tree 2 files changed +8
-8
lines changed 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ static ObjectOffset()
75
75
{
76
76
int size = IntPtr . Size ;
77
77
var n = 0 ; // Py_TRACE_REFS add two pointers to PyObject_HEAD
78
- #if Py_DEBUG
78
+ #if PYTHON_WITH_PYDEBUG
79
79
_ob_next = 0 ;
80
80
_ob_prev = 1 * size ;
81
81
n = 2 ;
@@ -113,14 +113,14 @@ public static int Size(IntPtr ob)
113
113
{
114
114
return ExceptionOffset . Size ( ) ;
115
115
}
116
- #if Py_DEBUG
116
+ #if PYTHON_WITH_PYDEBUG
117
117
return 6 * IntPtr . Size ;
118
118
#else
119
119
return 4 * IntPtr . Size ;
120
120
#endif
121
121
}
122
122
123
- #if Py_DEBUG
123
+ #if PYTHON_WITH_PYDEBUG
124
124
public static int _ob_next ;
125
125
public static int _ob_prev ;
126
126
#endif
@@ -185,7 +185,7 @@ static BytesOffset()
185
185
186
186
/* The *real* layout of a type object when allocated on the heap */
187
187
//typedef struct _heaptypeobject {
188
- #if Py_DEBUG // #ifdef Py_TRACE_REFS
188
+ #if PYTHON_WITH_PYDEBUG
189
189
/* _PyObject_HEAD_EXTRA defines pointers to support a doubly-linked list of all live heap objects. */
190
190
public static int _ob_next = 0 ;
191
191
public static int _ob_prev = 0 ;
Original file line number Diff line number Diff line change @@ -508,7 +508,7 @@ internal static Type[] PythonArgsToTypeArray(IntPtr arg, bool mangleObjects)
508
508
/// </summary>
509
509
internal static unsafe void XIncref ( IntPtr op )
510
510
{
511
- #if Py_DEBUG
511
+ #if PYTHON_WITH_PYDEBUG
512
512
// according to Python doc, Py_IncRef() is Py_XINCREF()
513
513
Py_IncRef ( op ) ;
514
514
return ;
@@ -530,7 +530,7 @@ internal static unsafe void XIncref(IntPtr op)
530
530
531
531
internal static unsafe void XDecref ( IntPtr op )
532
532
{
533
- #if Py_DEBUG
533
+ #if PYTHON_WITH_PYDEBUG
534
534
// Py_DecRef calls Python's Py_DECREF
535
535
// according to Python doc, Py_DecRef() is Py_XDECREF()
536
536
Py_DecRef ( op ) ;
@@ -584,7 +584,7 @@ internal static unsafe long Refcount(IntPtr op)
584
584
return 0 ;
585
585
}
586
586
587
- #if Py_DEBUG
587
+ #if PYTHON_WITH_PYDEBUG
588
588
// Py_IncRef and Py_DecRef are taking care of the extra payload
589
589
// in Py_DEBUG builds of Python like _Py_RefTotal
590
590
[ DllImport ( PythonDll ) ]
@@ -781,7 +781,7 @@ internal static unsafe IntPtr PyObject_TYPE(IntPtr op)
781
781
{
782
782
return IntPtr . Zero ;
783
783
}
784
- #if Py_DEBUG
784
+ #if PYTHON_WITH_PYDEBUG
785
785
var n = 3 ;
786
786
#else
787
787
var n = 1 ;
You can’t perform that action at this time.
0 commit comments