• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1======================
2What's New
3======================
4
5
6v1.12.2
7=======
8
9* Added temporary workaround to compile on CPython 3.8.0a2.
10
11
12v1.12.1
13=======
14
15* CPython 3 on Windows: we again no longer compile with ``Py_LIMITED_API``
16  by default because such modules *still* cannot be used with virtualenv.
17  The problem is that it doesn't work in CPython <= 3.4, and for
18  technical reason we can't enable this flag automatically based on the
19  version of Python.
20
21  Like before, `Issue #350`_ mentions a workaround if you still want
22  the ``Py_LIMITED_API`` flag and *either* you are not concerned about
23  virtualenv *or* you are sure your module will not be used on CPython
24  <= 3.4: pass ``define_macros=[("Py_LIMITED_API", None)]`` to the
25  ``ffibuilder.set_source()`` call.
26
27
28v1.12
29=====
30
31* `Direct support for pkg-config`__.
32
33* ``ffi.from_buffer()`` takes a new optional *first* argument that gives
34  the array type of the result.  It also takes an optional keyword argument
35  ``require_writable`` to refuse read-only Python buffers.
36
37* ``ffi.new()``, ``ffi.gc()`` or ``ffi.from_buffer()`` cdata objects
38  can now be released at known times, either by using the ``with``
39  keyword or by calling the new ``ffi.release()``.
40
41* Windows, CPython 3.x: cffi modules are linked with ``python3.dll``
42  again.  This makes them independant on the exact CPython version,
43  like they are on other platforms.  **It requires virtualenv 16.0.0.**
44
45* Accept an expression like ``ffi.new("int[4]", p)`` if ``p`` is itself
46  another cdata ``int[4]``.
47
48* CPython 2.x: ``ffi.dlopen()`` failed with non-ascii file names on Posix
49
50* CPython: if a thread is started from C and then runs Python code (with
51  callbacks or with the embedding solution), then previous versions of
52  cffi would contain possible crashes and/or memory leaks.  Hopefully,
53  this has been fixed (see `issue #362`_).
54
55* Support for ``ffi.cdef(..., pack=N)`` where N is a power of two.
56  Means to emulate ``#pragma pack(N)`` on MSVC.  Also, the default on
57  Windows is now ``pack=8``, like on MSVC.  This might make a difference
58  in corner cases, although I can't think of one in the context of CFFI.
59  The old way ``ffi.cdef(..., packed=True)`` remains and is equivalent
60  to ``pack=1`` (saying e.g. that fields like ``int`` should be aligned
61  to 1 byte instead of 4).
62
63.. __: cdef.html#pkgconfig
64.. _`issue #362`: https://bitbucket.org/cffi/cffi/issues/362/
65
66
67Older Versions
68==============
69
70v1.11.5
71-------
72
73* `Issue #357`_: fix ``ffi.emit_python_code()`` which generated a buggy
74  Python file if you are using a ``struct`` with an anonymous ``union``
75  field or vice-versa.
76
77* Windows: ``ffi.dlopen()`` should now handle unicode filenames.
78
79* ABI mode: implemented ``ffi.dlclose()`` for the in-line case (it used
80  to be present only in the out-of-line case).
81
82* Fixed a corner case for ``setup.py install --record=xx --root=yy``
83  with an out-of-line ABI module.  Also fixed `Issue #345`_.
84
85* More hacks on Windows for running CFFI's own ``setup.py``.
86
87* `Issue #358`_: in embedding, to protect against (the rare case of)
88  Python initialization from several threads in parallel, we have to use
89  a spin-lock.  On CPython 3 it is worse because it might spin-lock for
90  a long time (execution of ``Py_InitializeEx()``).  Sadly, recent
91  changes to CPython make that solution needed on CPython 2 too.
92
93* CPython 3 on Windows: we no longer compile with ``Py_LIMITED_API``
94  by default because such modules cannot be used with virtualenv.
95  `Issue #350`_ mentions a workaround if you still want that and are not
96  concerned about virtualenv: pass a ``define_macros=[("Py_LIMITED_API",
97  None)]`` to the ``ffibuilder.set_source()`` call.
98
99.. _`Issue #345`: https://bitbucket.org/cffi/cffi/issues/345/
100.. _`Issue #350`: https://bitbucket.org/cffi/cffi/issues/350/
101.. _`Issue #358`: https://bitbucket.org/cffi/cffi/issues/358/
102.. _`Issue #357`: https://bitbucket.org/cffi/cffi/issues/357/
103
104
105v1.11.4
106-------
107
108* Windows: reverted linking with ``python3.dll``, because
109  virtualenv does not make this DLL available to virtual environments
110  for now.  See `Issue #355`_.  On Windows only, the C extension
111  modules created by cffi follow for now the standard naming scheme
112  ``foo.cp36-win32.pyd``, to make it clear that they are regular
113  CPython modules depending on ``python36.dll``.
114
115.. _`Issue #355`: https://bitbucket.org/cffi/cffi/issues/355/
116
117
118v1.11.3
119-------
120
121* Fix on CPython 3.x: reading the attributes ``__loader__`` or
122  ``__spec__`` from the cffi-generated lib modules gave a buggy
123  SystemError.  (These attributes are always None, and provided only to
124  help compatibility with tools that expect them in all modules.)
125
126* More Windows fixes: workaround for MSVC not supporting large
127  literal strings in C code (from
128  ``ffi.embedding_init_code(large_string)``); and an issue with
129  ``Py_LIMITED_API`` linking with ``python35.dll/python36.dll`` instead
130  of ``python3.dll``.
131
132* Small documentation improvements.
133
134
135v1.11.2
136-------
137
138* Fix Windows issue with managing the thread-state on CPython 3.0 to 3.5
139
140
141v1.11.1
142-------
143
144* Fix tests, remove deprecated C API usage
145
146* Fix (hack) for 3.6.0/3.6.1/3.6.2 giving incompatible binary extensions
147  (cpython issue `#29943`_)
148
149* Fix for 3.7.0a1+
150
151.. _`#29943`: https://bugs.python.org/issue29943
152
153
154v1.11
155-----
156
157* Support the modern standard types ``char16_t`` and ``char32_t``.
158  These work like ``wchar_t``: they represent one unicode character, or
159  when used as ``charN_t *`` or ``charN_t[]`` they represent a unicode
160  string.  The difference with ``wchar_t`` is that they have a known,
161  fixed size.  They should work at all places that used to work with
162  ``wchar_t`` (please report an issue if I missed something).  Note
163  that with ``set_source()``, you need to make sure that these types are
164  actually defined by the C source you provide (if used in ``cdef()``).
165
166* Support the C99 types ``float _Complex`` and ``double _Complex``.
167  Note that libffi doesn't support them, which means that in the ABI
168  mode you still cannot call C functions that take complex numbers
169  directly as arguments or return type.
170
171* Fixed a rare race condition when creating multiple ``FFI`` instances
172  from multiple threads.  (Note that you aren't meant to create many
173  ``FFI`` instances: in inline mode, you should write ``ffi =
174  cffi.FFI()`` at module level just after ``import cffi``; and in
175  out-of-line mode you don't instantiate ``FFI`` explicitly at all.)
176
177* Windows: using callbacks can be messy because the CFFI internal error
178  messages show up to stderr---but stderr goes nowhere in many
179  applications.  This makes it particularly hard to get started with the
180  embedding mode.  (Once you get started, you can at least use
181  ``@ffi.def_extern(onerror=...)`` and send the error logs where it
182  makes sense for your application, or record them in log files, and so
183  on.)  So what is new in CFFI is that now, on Windows CFFI will try to
184  open a non-modal MessageBox (in addition to sending raw messages to
185  stderr).  The MessageBox is only visible if the process stays alive:
186  typically, console applications that crash close immediately, but that
187  is also the situation where stderr should be visible anyway.
188
189* Progress on support for `callbacks in NetBSD`__.
190
191* Functions returning booleans would in some case still return 0 or 1
192  instead of False or True.  Fixed.
193
194* `ffi.gc()`__ now takes an optional third parameter, which gives an
195  estimate of the size (in bytes) of the object.  So far, this is only
196  used by PyPy, to make the next GC occur more quickly (`issue #320`__).
197  In the future, this might have an effect on CPython too (provided
198  the CPython `issue 31105`__ is addressed).
199
200* Add a note to the documentation: the ABI mode gives function objects
201  that are *slower* to call than the API mode does.  For some reason it
202  is often thought to be faster.  It is not!
203
204.. __: https://bitbucket.org/cffi/cffi/issues/321/cffi-191-segmentation-fault-during-self
205.. __: ref.html#ffi-gc
206.. __: https://bitbucket.org/cffi/cffi/issues/320/improve-memory_pressure-management
207.. __: http://bugs.python.org/issue31105
208
209
210v1.10.1
211-------
212
213(only released inside PyPy 5.8.0)
214
215* Fixed the line numbers reported in case of ``cdef()`` errors.
216  Also, I just noticed, but pycparser always supported the preprocessor
217  directive ``# 42 "foo.h"`` to mean "from the next line, we're in file
218  foo.h starting from line 42", which it puts in the error messages.
219
220
221v1.10
222-----
223
224* Issue #295: use calloc() directly instead of
225  PyObject_Malloc()+memset() to handle ffi.new() with a default
226  allocator.  Speeds up ``ffi.new(large-array)`` where most of the time
227  you never touch most of the array.
228
229* Some OS/X build fixes ("only with Xcode but without CLT").
230
231* Improve a couple of error messages: when getting mismatched versions
232  of cffi and its backend; and when calling functions which cannot be
233  called with libffi because an argument is a struct that is "too
234  complicated" (and not a struct *pointer*, which always works).
235
236* Add support for some unusual compilers (non-msvc, non-gcc, non-icc,
237  non-clang)
238
239* Implemented the remaining cases for ``ffi.from_buffer``.  Now all
240  buffer/memoryview objects can be passed.  The one remaining check is
241  against passing unicode strings in Python 2.  (They support the buffer
242  interface, but that gives the raw bytes behind the UTF16/UCS4 storage,
243  which is most of the times not what you expect.  In Python 3 this has
244  been fixed and the unicode strings don't support the memoryview
245  interface any more.)
246
247* The C type ``_Bool`` or ``bool`` now converts to a Python boolean
248  when reading, instead of the content of the byte as an integer.  The
249  potential incompatibility here is what occurs if the byte contains a
250  value different from 0 and 1.  Previously, it would just return it;
251  with this change, CFFI raises an exception in this case.  But this
252  case means "undefined behavior" in C; if you really have to interface
253  with a library relying on this, don't use ``bool`` in the CFFI side.
254  Also, it is still valid to use a byte string as initializer for a
255  ``bool[]``, but now it must only contain ``\x00`` or ``\x01``.  As an
256  aside, ``ffi.string()`` no longer works on ``bool[]`` (but it never
257  made much sense, as this function stops at the first zero).
258
259* ``ffi.buffer`` is now the name of cffi's buffer type, and
260  ``ffi.buffer()`` works like before but is the constructor of that type.
261
262* ``ffi.addressof(lib, "name")``  now works also in in-line mode, not
263  only in out-of-line mode.  This is useful for taking the address of
264  global variables.
265
266* Issue #255: ``cdata`` objects of a primitive type (integers, floats,
267  char) are now compared and ordered by value.  For example, ``<cdata
268  'int' 42>`` compares equal to ``42`` and ``<cdata 'char' b'A'>``
269  compares equal to ``b'A'``.  Unlike C, ``<cdata 'int' -1>`` does not
270  compare equal to ``ffi.cast("unsigned int", -1)``: it compares
271  smaller, because ``-1 < 4294967295``.
272
273* PyPy: ``ffi.new()`` and ``ffi.new_allocator()()`` did not record
274  "memory pressure", causing the GC to run too infrequently if you call
275  ``ffi.new()`` very often and/or with large arrays.  Fixed in PyPy 5.7.
276
277* Support in ``ffi.cdef()`` for numeric expressions with ``+`` or
278  ``-``.  Assumes that there is no overflow; it should be fixed first
279  before we add more general support for arbitrary arithmetic on
280  constants.
281
282
283v1.9
284----
285
286* Structs with variable-sized arrays as their last field: now we track
287  the length of the array after ``ffi.new()`` is called, just like we
288  always tracked the length of ``ffi.new("int[]", 42)``.  This lets us
289  detect out-of-range accesses to array items.  This also lets us
290  display a better ``repr()``, and have the total size returned by
291  ``ffi.sizeof()`` and ``ffi.buffer()``.  Previously both functions
292  would return a result based on the size of the declared structure
293  type, with an assumed empty array.  (Thanks andrew for starting this
294  refactoring.)
295
296* Add support in ``cdef()/set_source()`` for unspecified-length arrays
297  in typedefs: ``typedef int foo_t[...];``.  It was already supported
298  for global variables or structure fields.
299
300* I turned in v1.8 a warning from ``cffi/model.py`` into an error:
301  ``'enum xxx' has no values explicitly defined: refusing to guess which
302  integer type it is meant to be (unsigned/signed, int/long)``.  Now I'm
303  turning it back to a warning again; it seems that guessing that the
304  enum has size ``int`` is a 99%-safe bet.  (But not 100%, so it stays
305  as a warning.)
306
307* Fix leaks in the code handling ``FILE *`` arguments.  In CPython 3
308  there is a remaining issue that is hard to fix: if you pass a Python
309  file object to a ``FILE *`` argument, then ``os.dup()`` is used and
310  the new file descriptor is only closed when the GC reclaims the Python
311  file object---and not at the earlier time when you call ``close()``,
312  which only closes the original file descriptor.  If this is an issue,
313  you should avoid this automatic convertion of Python file objects:
314  instead, explicitly manipulate file descriptors and call ``fdopen()``
315  from C (...via cffi).
316
317
318v1.8.3
319------
320
321* When passing a ``void *`` argument to a function with a different
322  pointer type, or vice-versa, the cast occurs automatically, like in C.
323  The same occurs for initialization with ``ffi.new()`` and a few other
324  places.  However, I thought that ``char *`` had the same
325  property---but I was mistaken.  In C you get the usual warning if you
326  try to give a ``char *`` to a ``char **`` argument, for example.
327  Sorry about the confusion.  This has been fixed in CFFI by giving for
328  now a warning, too.  It will turn into an error in a future version.
329
330
331v1.8.2
332------
333
334* Issue #283: fixed ``ffi.new()`` on structures/unions with nested
335  anonymous structures/unions, when there is at least one union in
336  the mix.  When initialized with a list or a dict, it should now
337  behave more closely like the ``{ }`` syntax does in GCC.
338
339
340v1.8.1
341------
342
343* CPython 3.x: experimental: the generated C extension modules now use
344  the "limited API", which means that, as a compiled .so/.dll, it should
345  work directly on any version of CPython >= 3.2.  The name produced by
346  distutils is still version-specific.  To get the version-independent
347  name, you can rename it manually to ``NAME.abi3.so``, or use the very
348  recent setuptools 26.
349
350* Added ``ffi.compile(debug=...)``, similar to ``python setup.py build
351  --debug`` but defaulting to True if we are running a debugging
352  version of Python itself.
353
354
355v1.8
356----
357
358* Removed the restriction that ``ffi.from_buffer()`` cannot be used on
359  byte strings.  Now you can get a ``char *`` out of a byte string,
360  which is valid as long as the string object is kept alive.  (But
361  don't use it to *modify* the string object!  If you need this, use
362  ``bytearray`` or other official techniques.)
363
364* PyPy 5.4 can now pass a byte string directly to a ``char *``
365  argument (in older versions, a copy would be made).  This used to be
366  a CPython-only optimization.
367
368
369v1.7
370----
371
372* ``ffi.gc(p, None)`` removes the destructor on an object previously
373  created by another call to ``ffi.gc()``
374
375* ``bool(ffi.cast("primitive type", x))`` now returns False if the
376  value is zero (including ``-0.0``), and True otherwise.  Previously
377  this would only return False for cdata objects of a pointer type when
378  the pointer is NULL.
379
380* bytearrays: ``ffi.from_buffer(bytearray-object)`` is now supported.
381  (The reason it was not supported was that it was hard to do in PyPy,
382  but it works since PyPy 5.3.)  To call a C function with a ``char *``
383  argument from a buffer object---now including bytearrays---you write
384  ``lib.foo(ffi.from_buffer(x))``.  Additionally, this is now supported:
385  ``p[0:length] = bytearray-object``.  The problem with this was that a
386  iterating over bytearrays gives *numbers* instead of *characters*.
387  (Now it is implemented with just a memcpy, of course, not actually
388  iterating over the characters.)
389
390* C++: compiling the generated C code with C++ was supposed to work,
391  but failed if you make use the ``bool`` type (because that is rendered
392  as the C ``_Bool`` type, which doesn't exist in C++).
393
394* ``help(lib)`` and ``help(lib.myfunc)`` now give useful information,
395  as well as ``dir(p)`` where ``p`` is a struct or pointer-to-struct.
396
397
398v1.6
399----
400
401* `ffi.list_types()`_
402
403* `ffi.unpack()`_
404
405* `extern "Python+C"`_
406
407* in API mode, ``lib.foo.__doc__`` contains the C signature now.  On
408  CPython you can say ``help(lib.foo)``, but for some reason
409  ``help(lib)`` (or ``help(lib.foo)`` on PyPy) is still useless; I
410  haven't yet figured out the hacks needed to convince ``pydoc`` to
411  show more.  (You can use ``dir(lib)`` but it is not most helpful.)
412
413* Yet another attempt at robustness of ``ffi.def_extern()`` against
414  CPython's interpreter shutdown logic.
415
416.. _`ffi.list_types()`: ref.html#ffi-list-types
417.. _`ffi.unpack()`: ref.html#ffi-unpack
418.. _`extern "Python+C"`: using.html#extern-python-c
419
420
421v1.5.2
422------
423
424* Fix 1.5.1 for Python 2.6.
425
426
427v1.5.1
428------
429
430* A few installation-time tweaks (thanks Stefano!)
431
432* Issue #245: Win32: ``__stdcall`` was never generated for
433  ``extern "Python"`` functions
434
435* Issue #246: trying to be more robust against CPython's fragile
436  interpreter shutdown logic
437
438
439v1.5.0
440------
441
442* Support for `using CFFI for embedding`__.
443
444.. __: embedding.html
445
446
447v1.4.2
448------
449
450Nothing changed from v1.4.1.
451
452
453v1.4.1
454------
455
456* Fix the compilation failure of cffi on CPython 3.5.0.  (3.5.1 works;
457  some detail changed that makes some underscore-starting macros
458  disappear from view of extension modules, and I worked around it,
459  thinking it changed in all 3.5 versions---but no: it was only in
460  3.5.1.)
461
462
463v1.4.0
464------
465
466* A `better way to do callbacks`__ has been added (faster and more
467  portable, and usually cleaner).  It is a mechanism for the
468  out-of-line API mode that replaces the dynamic creation of callback
469  objects (i.e. C functions that invoke Python) with the static
470  declaration in ``cdef()`` of which callbacks are needed.  This is
471  more C-like, in that you have to structure your code around the idea
472  that you get a fixed number of function pointers, instead of
473  creating them on-the-fly.
474
475* ``ffi.compile()`` now takes an optional ``verbose`` argument.  When
476  ``True``, distutils prints the calls to the compiler.
477
478* ``ffi.compile()`` used to fail if given ``sources`` with a path that
479  includes ``".."``.  Fixed.
480
481* ``ffi.init_once()`` added.  See docs__.
482
483* ``dir(lib)`` now works on libs returned by ``ffi.dlopen()`` too.
484
485* Cleaned up and modernized the content of the ``demo`` subdirectory
486  in the sources (thanks matti!).
487
488* ``ffi.new_handle()`` is now guaranteed to return unique ``void *``
489  values, even if called twice on the same object.  Previously, in
490  that case, CPython would return two ``cdata`` objects with the same
491  ``void *`` value.  This change is useful to add and remove handles
492  from a global dict (or set) without worrying about duplicates.
493  It already used to work like that on PyPy.
494  *This change can break code that used to work on CPython by relying
495  on the object to be kept alive by other means than keeping the
496  result of ffi.new_handle() alive.*  (The corresponding `warning in
497  the docs`__ of ``ffi.new_handle()`` has been here since v0.8!)
498
499.. __: using.html#extern-python
500.. __: ref.html#ffi-init-once
501.. __: ref.html#ffi-new-handle
502
503
504v1.3.1
505------
506
507* The optional typedefs (``bool``, ``FILE`` and all Windows types) were
508  not always available from out-of-line FFI objects.
509
510* Opaque enums are phased out from the cdefs: they now give a warning,
511  instead of (possibly wrongly) being assumed equal to ``unsigned int``.
512  Please report if you get a reasonable use case for them.
513
514* Some parsing details, notably ``volatile`` is passed along like
515  ``const`` and ``restrict``.  Also, older versions of pycparser
516  mis-parse some pointer-to-pointer types like ``char * const *``: the
517  "const" ends up at the wrong place.  Added a workaround.
518
519
520v1.3.0
521------
522
523* Added `ffi.memmove()`_.
524
525* Pull request #64: out-of-line API mode: we can now declare
526  floating-point types with ``typedef float... foo_t;``.  This only
527  works if ``foo_t`` is a float or a double, not ``long double``.
528
529* Issue #217: fix possible unaligned pointer manipulation, which crashes
530  on some architectures (64-bit, non-x86).
531
532* Issues #64 and #126: when using ``set_source()`` or ``verify()``,
533  the ``const`` and ``restrict`` keywords are copied from the cdef
534  to the generated C code; this fixes warnings by the C compiler.
535  It also fixes corner cases like ``typedef const int T; T a;``
536  which would previously not consider ``a`` as a constant.  (The
537  cdata objects themselves are never ``const``.)
538
539* Win32: support for ``__stdcall``.  For callbacks and function
540  pointers; regular C functions still don't need to have their `calling
541  convention`_ declared.
542
543* Windows: CPython 2.7 distutils doesn't work with Microsoft's official
544  Visual Studio for Python, and I'm told this is `not a bug`__.  For
545  ffi.compile(), we `removed a workaround`__ that was inside cffi but
546  which had unwanted side-effects.  Try saying ``import setuptools``
547  first, which patches distutils...
548
549.. _`ffi.memmove()`: ref.html#ffi-memmove
550.. __: https://bugs.python.org/issue23246
551.. __: https://bitbucket.org/cffi/cffi/pull-requests/65/remove-_hack_at_distutils-which-imports/diff
552.. _`calling convention`: using.html#windows-calling-conventions
553
554
555v1.2.1
556------
557
558Nothing changed from v1.2.0.
559
560
561v1.2.0
562------
563
564* Out-of-line mode: ``int a[][...];`` can be used to declare a structure
565  field or global variable which is, simultaneously, of total length
566  unknown to the C compiler (the ``a[]`` part) and each element is
567  itself an array of N integers, where the value of N *is* known to the
568  C compiler (the ``int`` and ``[...]`` parts around it).  Similarly,
569  ``int a[5][...];`` is supported (but probably less useful: remember
570  that in C it means ``int (a[5])[...];``).
571
572* PyPy: the ``lib.some_function`` objects were missing the attributes
573  ``__name__``, ``__module__`` and ``__doc__`` that are expected e.g. by
574  some decorators-management functions from ``functools``.
575
576* Out-of-line API mode: you can now do ``from _example.lib import x``
577  to import the name ``x`` from ``_example.lib``, even though the
578  ``lib`` object is not a standard module object.  (Also works in ``from
579  _example.lib import *``, but this is even more of a hack and will fail
580  if ``lib`` happens to declare a name called ``__all__``.  Note that
581  ``*`` excludes the global variables; only the functions and constants
582  make sense to import like this.)
583
584* ``lib.__dict__`` works again and gives you a copy of the
585  dict---assuming that ``lib`` has got no symbol called precisely
586  ``__dict__``.  (In general, it is safer to use ``dir(lib)``.)
587
588* Out-of-line API mode: global variables are now fetched on demand at
589  every access.  It fixes issue #212 (Windows DLL variables), and also
590  allows variables that are defined as dynamic macros (like ``errno``)
591  or ``__thread`` -local variables.  (This change might also tighten
592  the C compiler's check on the variables' type.)
593
594* Issue #209: dereferencing NULL pointers now raises RuntimeError
595  instead of segfaulting.  Meant as a debugging aid.  The check is
596  only for NULL: if you dereference random or dead pointers you might
597  still get segfaults.
598
599* Issue #152: callbacks__: added an argument ``ffi.callback(...,
600  onerror=...)``.  If the main callback function raises an exception
601  and ``onerror`` is provided, then ``onerror(exception, exc_value,
602  traceback)`` is called.  This is similar to writing a ``try:
603  except:`` in the main callback function, but in some cases (e.g. a
604  signal) an exception can occur at the very start of the callback
605  function---before it had time to enter the ``try: except:`` block.
606
607* Issue #115: added ``ffi.new_allocator()``, which officializes
608  support for `alternative allocators`__.
609
610.. __: using.html#callbacks
611.. __: ref.html#ffi-new-allocator
612
613
614v1.1.2
615------
616
617* ``ffi.gc()``: fixed a race condition in multithreaded programs
618  introduced in 1.1.1
619
620
621v1.1.1
622------
623
624* Out-of-line mode: ``ffi.string()``, ``ffi.buffer()`` and
625  ``ffi.getwinerror()`` didn't accept their arguments as keyword
626  arguments, unlike their in-line mode equivalent.  (It worked in PyPy.)
627
628* Out-of-line ABI mode: documented a restriction__ of ``ffi.dlopen()``
629  when compared to the in-line mode.
630
631* ``ffi.gc()``: when called several times with equal pointers, it was
632  accidentally registering only the last destructor, or even none at
633  all depending on details.  (It was correctly registering all of them
634  only in PyPy, and only with the out-of-line FFIs.)
635
636.. __: cdef.html#dlopen-note
637
638
639v1.1.0
640------
641
642* Out-of-line API mode: we can now declare integer types with
643  ``typedef int... foo_t;``.  The exact size and signedness of ``foo_t``
644  is figured out by the compiler.
645
646* Out-of-line API mode: we can now declare multidimensional arrays
647  (as fields or as globals) with ``int n[...][...]``.  Before, only the
648  outermost dimension would support the ``...`` syntax.
649
650* Out-of-line ABI mode: we now support any constant declaration,
651  instead of only integers whose value is given in the cdef.  Such "new"
652  constants, i.e. either non-integers or without a value given in the
653  cdef, must correspond to actual symbols in the lib.  At runtime they
654  are looked up the first time we access them.  This is useful if the
655  library defines ``extern const sometype somename;``.
656
657* ``ffi.addressof(lib, "func_name")`` now returns a regular cdata object
658  of type "pointer to function".  You can use it on any function from a
659  library in API mode (in ABI mode, all functions are already regular
660  cdata objects).  To support this, you need to recompile your cffi
661  modules.
662
663* Issue #198: in API mode, if you declare constants of a ``struct``
664  type, what you saw from lib.CONSTANT was corrupted.
665
666* Issue #196: ``ffi.set_source("package._ffi", None)`` would
667  incorrectly generate the Python source to ``package._ffi.py`` instead
668  of ``package/_ffi.py``.  Also fixed: in some cases, if the C file was
669  in ``build/foo.c``, the .o file would be put in ``build/build/foo.o``.
670
671
672v1.0.3
673------
674
675* Same as 1.0.2, apart from doc and test fixes on some platforms.
676
677
678v1.0.2
679------
680
681* Variadic C functions (ending in a "..." argument) were not supported
682  in the out-of-line ABI mode.  This was a bug---there was even a
683  (non-working) example__ doing exactly that!
684
685.. __: overview.html#out-of-line-abi-level
686
687
688v1.0.1
689------
690
691* ``ffi.set_source()`` crashed if passed a ``sources=[..]`` argument.
692  Fixed by chrippa on pull request #60.
693
694* Issue #193: if we use a struct between the first cdef() where it is
695  declared and another cdef() where its fields are defined, then this
696  definition was ignored.
697
698* Enums were buggy if you used too many "..." in their definition.
699
700
701v1.0.0
702------
703
704* The main news item is out-of-line module generation:
705
706  * `for ABI level`_, with ``ffi.dlopen()``
707
708  * `for API level`_, which used to be with ``ffi.verify()``, now deprecated
709
710* (this page will list what is new from all versions from 1.0.0
711  forward.)
712
713.. _`for ABI level`: overview.html#out-of-line-abi-level
714.. _`for API level`: overview.html#out-of-line-api-level
715