view python/pydc/test/Makefile @ 66:7a61dd082341 default tip

pydc: - fix double free triggered by capsule destructor, when freeing pydc and callback objects, manually
author Tassilo Philipp
date Fri, 24 May 2024 18:16:29 +0200
parents 9b6cdffd30dd
children
line wrap: on
line source

.PHONY: test.so

test.so:
	(for i in char 'unsigned char' short 'unsigned short' int 'unsigned int' long 'unsigned long' 'long long' 'unsigned long long' float double 'const char*'; do \
		echo "$$i `echo $$i | sed -E 's/\*/ p/;s/(^| )([a-z])[^ ]*/\2/g'`_plus_one($$i v) { return v+1; }"; \
	done; \
	echo 'void cp_head_incr(char* v) { v[0]+=1; }'; \
	echo 'int llp64() { return sizeof(int) == sizeof(long); }') | \
		${CC} -`[ \`uname\` = Darwin ] && echo dynamiclib || echo shared` -x c - -o $@
	@echo Done! Now you can run types_test.py