File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -175,12 +175,6 @@ def self.Py_None
175
175
176
176
attach_variable :PyType_Type , PyTypeObjectStruct
177
177
178
- if libpython . find_variable ( '_PyNone_Type' )
179
- attach_variable :PyNone_Type , :_PyNone_Type , PyTypeObjectStruct
180
- else
181
- attach_variable :PyNone_Type , PyTypeObjectStruct
182
- end
183
-
184
178
if libpython . find_variable ( 'PyInt_Type' )
185
179
has_PyInt_Type = true
186
180
attach_variable :PyInt_Type , PyTypeObjectStruct
Original file line number Diff line number Diff line change @@ -59,11 +59,11 @@ module PyCall
59
59
end
60
60
61
61
it 'works for Python type objects' do
62
- pynone_type = PyPtr . incref ( PyPtr . new ( LibPython . PyNone_Type . to_ptr . address ) )
62
+ pytype_type = PyPtr . incref ( PyPtr . new ( LibPython . PyType_Type . to_ptr . address ) )
63
63
pylong_type = PyPtr . incref ( PyPtr . new ( LibPython . PyLong_Type . to_ptr . address ) )
64
64
65
- expect ( PyPtr :: None . kind_of? ( pynone_type ) ) . to eq ( true )
66
- expect ( PyPtr :: None . kind_of? ( pylong_type ) ) . to eq ( false )
65
+ expect ( pylong_type . kind_of? ( pytype_type ) ) . to eq ( true )
66
+ expect ( pylong_type . kind_of? ( pylong_type ) ) . to eq ( false )
67
67
68
68
expect { PyPtr ::None . kind_of? ( PyPtr ::None ) } . to raise_error ( TypeError )
69
69
end
You can’t perform that action at this time.
0 commit comments