Fix the build on Windows.

main
David Chisnall 7 years ago
parent a04d0e8547
commit af55c29007

@ -56,9 +56,12 @@ static inline arc_tls_key_t arc_tls_key_create(arc_cleanup_function_t cleanupFun
arc_tls_key_t ARCThreadKey;
#endif
extern struct objc_class _NSConcreteMallocBlock;
extern struct objc_class _NSConcreteStackBlock;
extern struct objc_class _NSConcreteGlobalBlock;
extern "C"
{
extern struct objc_class _NSConcreteMallocBlock;
extern struct objc_class _NSConcreteStackBlock;
extern struct objc_class _NSConcreteGlobalBlock;
}
@interface NSAutoreleasePool
+ (Class)class;
@ -639,10 +642,23 @@ struct malloc_allocator
{
return static_cast<T*>(malloc(sizeof(T) * n));
}
void deallocate(T* p, std::size_t)
{
free(p);
}
template<typename X>
malloc_allocator &operator=(const malloc_allocator<X>&) const
{
return *this;
}
bool operator==(const malloc_allocator &) const
{
return true;
}
template<typename X>
operator malloc_allocator<X>() const
{

@ -4,6 +4,11 @@
#include "objc/runtime.h"
#include <stdint.h>
#ifdef __cplusplus
extern "C"
{
#endif
/**
* Overflow bitfield. Used for bitfields that are more than 63 bits.
*/
@ -443,4 +448,7 @@ void freeIvarLists(Class aClass);
*/
void freeMethodLists(Class aClass);
#ifdef __cplusplus
} // extern "C"
#endif
#endif //__OBJC_CLASS_H_INCLUDED

Loading…
Cancel
Save