Commit graph

81 commits

Author SHA1 Message Date
kngwyu 63ec65d5ac Refactor ReleasePool 2018-11-21 16:00:26 +09:00
kngwyu acbab2b3f0 Use ArrayList::truncate for borrowed pointers 2018-11-21 16:00:26 +09:00
kngwyu 4c38b21e49 Fix ArrayList::push_back 2018-11-21 16:00:26 +09:00
kngwyu be77846979 Use LinkedList<[T; 256]> in ReleasePool 2018-11-21 16:00:26 +09:00
kngwyu 25a5b74ba6 Use linked list in ReleasePool 2018-11-21 16:00:26 +09:00
konstin 13d4d66fdb cargo fmt 2018-11-15 21:58:22 +01:00
konstin d618ca401a
Merge pull request #274 from kngwyu/releasepool-nonnull
Use NonNull in ReleasePool and add bench_dict
2018-11-15 20:27:06 +01:00
konstin 9c8c5a6063 Rename #[pymodinit] to #[pymodule] 2018-11-15 19:43:29 +01:00
kngwyu a73bd06c1f Replace NonNull::new_unchecked with new().unwrap() in test 2018-11-15 13:40:35 +09:00
kngwyu 6d442e5969 Use NonNull in release pool 2018-11-14 15:39:07 +09:00
konstin 3614f38154 Remove some transmute 2018-11-12 21:38:20 +01:00
konstin 9f45efebaf Format 2018-11-11 12:25:53 +01:00
ijl 50c6129607 NonNull pointer for Py, PyObject 2018-11-08 15:09:52 +00:00
konstin 9ffb2c617d Run rustfmt 2018-11-02 22:59:30 +01:00
konstin 8b27f1e412 Get ready for rust 2018 2018-10-31 11:43:21 +01:00
konstin 302c099a76 Big refactoring to shrink the prelude 2018-09-21 23:34:28 +02:00
konstin 2904291b9e Better code generation 2018-09-17 19:48:22 +02:00
konstin 10ef6cd111 Fix cfg on PyEval_InitThread to fix #219 2018-09-11 22:38:31 +02:00
Paul Ganssle c3986a7244
Fix race condition in test_borrowed*
This fixes a race condition in test_borrowed and test_borrowed_nested
by making the object under test different in each thread.
2018-08-21 20:20:24 -04:00
konstin 771d59b913 Fix another bunch of clippy lints 2018-08-21 23:51:13 +02:00
konstin fe8a719ee1 Rustfmt all the things ✔️ 2018-07-30 23:05:10 +02:00
konstin fe931a594f #[pymodinit] now uses the function name as default module name 2018-07-10 00:13:02 +02:00
konstin 4013d40897 Add py prefix to the proc macros and move them into the root module
This is important because `proc_macro_path_invoc` isn't going to be stabilized soon.
2018-07-08 23:33:48 +02:00
konstin 28d6c9986c Fix clippy errors 2018-07-03 21:32:16 +02:00
konstin 43eb5fa490 Rename prepare_pyo3_library to init_once 2018-07-03 21:12:57 +02:00
konstin 6645708e4f Get rid of #[py*] methods 2018-07-03 20:42:02 +02:00
konstin d0c42dfcc1 Fix compilation on nightly 2018-05-01 15:44:38 +02:00
Nikolay Kim 057660e546 fix python3.7 support 2018-02-21 10:29:14 -08:00
Nikolay Kim d50d1fb7ea enable python3.7 builds 2018-02-21 10:06:48 -08:00
Vlad Shcherbina 81fd4bd24e Remove PyEval_ThreadsInitialized() assertion #110
First, this function should not be called before `Py_Initialize()`.
It accesses the field `_PyRuntime.ceval.gil.locked` of the global
variable, which is zero initially, but uses -1 to indicate that
the GIL is not created or destroyed.
(8ff5356473/Python/ceval_gil.h (L98))

Second, this assertion can't be moved after `Py_InitializeEx(0)` call,
because in Python 3.7 they started calling `PyEval_InitThreads()`
from `Py_Initialize()`.
(2914bb32e2 (diff-baf5eab51059d96fb8837152dab0d1a4R689))
2018-02-10 21:36:59 +03:00
Nikolay Kim b738c1a04b clippy warnings 2018-01-19 10:02:36 -08:00
Nikolay Kim 324a6b2697 drop RefFromPyObject; allow mut refs #106 2018-01-19 09:04:42 -08:00
Nikolay Kim 3b00145040 fix #[prop] impl 2017-08-07 23:52:24 -07:00
Nikolay Kim 5537ece078 fix unstable tests 2017-08-03 11:37:24 -07:00
Nikolay Kim 65a42a2b1a remove py param 2017-07-25 18:11:45 -07:00
Nikolay Kim 2ee6419464 do not catch rust panics 2017-07-20 14:21:57 -07:00
Nikolay Kim 01d688fc98 use better name for Pointers 2017-07-18 11:12:35 -07:00
messense dd29dbce80 Use std::ptr::null() and std::ptr::null_mut() (#51) 2017-07-18 23:23:21 +08:00
messense 5a8fd2febc
Some more clippy warning fixes
[rustfix](https://github.com/killercup/rustfix) makes it much easier.
2017-07-18 22:10:56 +08:00
messense e69163344a Fix some clippy warnings (#49) 2017-07-18 19:28:49 +08:00
Nikolay Kim ed31492d36 rename pointer mod to object 2017-07-13 13:05:50 -07:00
Nikolay Kim 27f8747ba6 safe typeob dealloc and tests for release pools 2017-07-13 13:01:31 -07:00
Nikolay Kim ce05cb91c0 fix pointer release list 2017-07-10 00:37:20 +06:00
Nikolay Kim c1c4648add delay decref until gil available 2017-07-09 12:08:57 +06:00
Nikolay Kim 3028dcf58f fix error from instancel fixed bool 2017-06-30 08:51:45 +06:00
Nikolay Kim 082db89aa6 do not modify ref counter for borrowed ptr 2017-06-24 12:57:18 -07:00
Nikolay Kim 3a2004eab2 rename PyInstance to PyObjectRef 2017-06-24 08:28:31 -07:00
Nikolay Kim 3e3fed9c18 remove True and False python methods 2017-06-23 13:42:46 -07:00
Nikolay Kim cc56ded6bf fix python2 extension module initialization 2017-06-23 11:51:15 -07:00
Nikolay Kim a58aa7b5e6 rename PyObject 2017-06-22 20:56:09 -07:00