You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
c_import: present a function-like macro that is a single call with constant arguments #3516
zlib's real initializers take two parameters only the header's macro supplies: inflateInit(strm) is inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)), and deflateInit, inflateInit2 and deflateInit2 have the same shape (pinned zlib.h, lines 1913 to 1950). A contract today must name inflateInit_ and fix both parameters (param version fixed ZLIB_VERSION, param stream_size fixed sizeof(z_stream), ruled the same day).
The header's macro already says exactly what to pass. If c_import presented a function-like macro whose body is a single call with constant arguments, a contract could name inflateInit itself and need no fixed lines.
To find out first: how much of this the importer does today (it already types object-like macros), and how many macros of this shape the surveyed libraries have.
Activity
A contract can name a forwarding macro; zlib's facts name the initial…