cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end ) | use cffi for calling C | if a pep adds a mere 25-30 [C-API] functions or so, it's a drop in the ocean (cough) - Armin
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
xcm has quit [Remote host closed the connection]
<michelp>
I use CFFI with the pygraphblas project and I've received a report from a user about build errors on OSX. Unfortunately I don't have that platform to test with so I was hoping someone might be able to suggest a solution: https://github.com/michelp/pygraphblas/issues/19
xcm has joined #pypy
marky1991 has quit [Ping timeout: 252 seconds]
marky1991 has joined #pypy
<cfbolz>
michelp: we don't have a lot of Mac devs around either, unfortunately :-(
oberstet_ has joined #pypy
<cfbolz>
michelp: but maybe still file a cffi issue?
<michelp>
ok, sounds like i should open a github issue for cffi then?
<michelp>
ah beat me to it
<michelp>
ok will do thanks!
<arigato>
what mess mac people makes
<arigato>
oh let's just kill malloc.h because who includes that anyway
<cfbolz>
Yes the newest os x release seems to break various things
oberstet has quit [Ping timeout: 260 seconds]
<arigato>
if someone finds out the right #ifdef, I don't mind adding it around ``#include "malloc.h"``
<arigato>
I guess we can't just never include malloc.h on Mac because on older versions it is necessary
<arigato>
so cffi needs "malloc.h" not for malloc(), which is always there nowadays from stdlib.h, but for alloca()
<arigato>
I see in some random code on github that it's a total mess to get alloca()
jcea has joined #pypy
<arigato>
but probably it's enough to do:
<arigato>
#ifdef __GNUC__
<arigato>
# define alloca __builtin_alloca
<arigato>
#else
<arigato>
# include "malloc.h"
<arigato>
#endif
<arigato>
(clang lies and defines __GNUC__ too)
<arigato>
OK correction: I misread a detail and all I said above is irrelevant
<arigato>
the exact line "#include <malloc.h>", with no space between the "#" and the "include", as pasted on that bug report, is not coming from cffi at all
<arigato>
issue closed :-)
<michelp>
Sorry about the noise!
<arigato>
no problem!
<michelp>
You guys are fast I stepped away from my desk for 10 minutes 🙂