summaryrefslogtreecommitdiff
path: root/c
Commit message (Collapse)AuthorAgeFilesLines
* Detect and mark the final variable array in a varsized struct with ↵calculate_variable_array_lengthAndrew Leech2016-09-142-8/+11
| | | | | | BS_VARSIZESTRUCT_ARRAY Use this when returning this field/arrtibute of said struct
* Add some initial test assertions to check length details on variable length ↵Andrew Leech2016-09-131-3/+8
| | | | structs
* When using a variable length struct, calculate and enforce the length of the ↵Andrew Leech2016-09-131-1/+26
| | | | varsized_array when accessing this field.
* When getting repr on CDataObject_own_structptr, use length field for owned bytesnew_struct_allocated_sizeAndrew Leech2016-09-121-1/+3
|
* When getting ffi.buffer() on CDataObject_own_structptr, use length field for ↵Andrew Leech2016-09-121-1/+5
| | | | buffer size
* Add length field to CDataObject_own_structptr to hold the size of the memory ↵Andrew Leech2016-09-121-0/+2
| | | | | | block allocated for the struct. This is particularly useful for C99 variable-sized structures where the sizeof(<typedef>) does not directly inform the allocated size.
* A direct testArmin Rigo2016-09-061-0/+19
|
* Update and document v1.8.2Armin Rigo2016-09-062-2/+2
|
* Issue #283: initializer for nested anonymous structs inside unionsArmin Rigo2016-09-051-17/+15
|
* Bump version number to 1.8.1Armin Rigo2016-09-032-2/+2
|
* Returning unions works fine in API mode, remove the checks.Armin Rigo2016-08-221-2/+3
|
* Avoid calling more CPython functions when there is an exception setArmin Rigo2016-08-221-0/+2
|
* Give an error when subtracting two pointers and the division's result isArmin Rigo2016-08-152-2/+23
| | | | | not exact (in gcc, we get nonsense, so it means it is undefined behavior for C, which is best handled by raising in cffi)
* Update the version number to 1.8Armin Rigo2016-08-062-2/+2
|
* The null_byte_after_str branch of PyPy makes ffi.from_buffer(str)Armin Rigo2016-08-022-1/+11
| | | | possible.
* Fix for a3708c91be7bArmin Rigo2016-07-161-5/+8
|
* Same hereArmin Rigo2016-07-111-1/+1
|
* Use Py_ssize_t, not ssize_t directlyArmin Rigo2016-07-111-1/+1
|
* Issue #266: I think it would show up here, so better change the assert()Armin Rigo2016-06-091-1/+14
| | | | into a real test that runs also on non-debugging compilation.
* Support dir(p), where p is a struct or pointer-to-struct, to obtainArmin Rigo2016-06-062-2/+49
| | | | the list of field names.
* Python3 compatArmin Rigo2016-06-051-1/+1
|
* update version number to 1.7Armin Rigo2016-06-052-2/+2
|
* Add a test for another use caseArmin Rigo2016-06-031-0/+7
|
* Fix docstringsArmin Rigo2016-06-031-1/+1
|
* Slice assignment with bytearray as sourceArmin Rigo2016-06-032-12/+27
|
* From PyPy 5.2, bytearray buffers can fetch a raw pointer, soArmin Rigo2016-06-032-10/+19
| | | | there is no reason any more to prevent from_buffer(bytearray()).
* Haaaack! Have 'lib.__class__' return &PyModule_Type. It makesArmin Rigo2016-05-251-3/+7
| | | | | | | | | help(lib) behave and display a nice module-like view of your compiled lib. Note that this is seriously unexpected, but I hope nobody should get hit by it by looking at 'lib.__class__' directly... Might be reverted if I hear about someone :-)
* fix: Lib objects didn't have the cyclic GC enabledArmin Rigo2016-05-251-3/+3
|
* an extra testArmin Rigo2016-05-071-0/+1
|
* Issue #255: `bool(ffi.cast("primitive", x))` is now True or FalseArmin Rigo2016-05-072-3/+20
| | | | | depending on whether the value is zero or not. It used to always be True for any value.
* Add ffi.gc(ptr, None) which *removes* the destructor in-place on a ffi.gc() ↵Amaury Forgeot d'Arc2016-04-231-0/+11
| | | | object.
* kill unused varArmin Rigo2016-04-211-1/+0
|
* Support help(lib.foo)Armin Rigo2016-04-193-55/+123
|
* update the version number to 1.6Armin Rigo2016-04-172-2/+2
|
* Oops. In this case, unpack(p) returns a list of <cdata struct> thatArmin Rigo2016-04-171-1/+2
| | | | are each inside 'p'. So 'p' must be kept alive
* There is no reason to restrict ffi.unpack() to primitives.Armin Rigo2016-04-173-15/+60
|
* Remove again ffi.rawstring(), and implement instead ffi.unpack().Armin Rigo2016-04-163-43/+154
| | | | | | | | | | | | | Pre-documentation notes: (hi Amaury :-) * ffi.unpack(<cdata 'char'>, n) == ffi.buffer(<cdata 'char'>, n)[:] but I hope it is a little bit more natural * ffi.unpack(<cdata 'wchar_t'>, n): this is the original motivation, because it has no previous equivalent * ffi.unpack(<cdata 'int'>, n) == list(<cdata 'int'>[0:n]) but should be much faster on CPython
* Python3 compatArmin Rigo2016-04-151-4/+4
|
* Also accept arrays of int8_t or uint8_t, like ffi.string()Armin Rigo2016-04-152-15/+22
|
* Add a test hereArmin Rigo2016-04-151-0/+15
|
* ffi.rawstring(), with a minimal interfaceArmin Rigo2016-04-152-0/+45
|
* Change get_current_ts to always use _Py_atomic_load_relaxed when available.Michael McGee2016-04-051-1/+1
|
* Change the API of ffi.list_types()Armin Rigo2016-03-301-32/+35
|
* ffi.list_types()Armin Rigo2016-03-271-0/+52
|
* Python 3 compatArmin Rigo2016-03-161-1/+1
|
* Another attempt at improving the shutdown issues w.r.t. @def_externArmin Rigo2016-03-151-16/+44
|
* Update versionArmin Rigo2016-02-132-2/+2
|
* bump the version numberArmin Rigo2016-02-092-2/+2
|
* issue #246: trying to be more robust against CPython's fragileArmin Rigo2016-02-061-4/+10
| | | | interpreter shutdown logic
* bump version number to 1.5.0Armin Rigo2016-01-152-2/+2
|