Use wxObjCID instead of "struct objc_object*" to fix clang build.

Clang doesn't accept "struct objc_object*" as synonym for "id" in Objective-C
code, so use the real "id" for it while still using the struct pointer for C++
code where "id" is not defined.

Closes #13565.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-05-20 20:29:50 +00:00
parent 445eaabd3e
commit d92f48bd43
3 changed files with 30 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
///////////////////////////////////////////////////////////////////////////////
// Name: osx/private/objcid.h
// Purpose: Define wxObjCID working in both C++ and Objective-C.
// Author: Vadim Zeitlin
// Created: 2012-05-20
// RCS-ID: $Id: wxhead.h,v 1.12 2010-04-22 12:44:51 zeitlin Exp $
// Copyright: (c) 2012 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OSX_PRIVATE_OBJCID_H_
#define _WX_OSX_PRIVATE_OBJCID_H_
// ----------------------------------------------------------------------------
// wxObjCID: Equivalent of Objective-C "id" that works in C++ code.
// ----------------------------------------------------------------------------
#ifdef __OBJC__
#define wxObjCID id
#else
typedef struct objc_object* wxObjCID;
#endif
#endif // _WX_OSX_PRIVATE_OBJCID_H_