Al-Noor Ladhani
Al-Noor Ladhani

Reputation: 2433

How to make GDATAXML compatible with ARC in XCODE 4.2?

I tried to convert GDATAXML Lib to ARC automatically with the refractor -> Convert to ARC Objective-C in XCode 4.2.

The ARC converter gives the following error:

  result = [NSString stringWithUTF8String:(const char *) chars];
  if (cacheDict) {
    // save the string in the document's string cache
    CFDictionarySetValue(cacheDict, chars, result);
  }

error: Impicit conversion of Ojective-C pointer to void.

Has anyone succeeded in converting the GDATAXML Libs to ARC Objective-C?

Upvotes: 6

Views: 3259

Answers (3)

James
James

Reputation: 861

I found someone who has (apparently successfully) done the refactor for ARC.

see: http://www.michaelbabiy.com/arc-compliant-gdataxml-library/

Upvotes: 3

yoninja
yoninja

Reputation: 1962

please follow the instructions on how to make GDataXML work on your code: http://ibombsite.blogspot.com/2012/02/how-to-make-gdataxmlnode-work.html

Upvotes: 7

iDroid
iDroid

Reputation: 10533

You need to use bridged cast:

CFDictionarySetValue(cacheDict, chars, (__bridge_retained_void*) result);

Check out Apple's article "Transitioning to ARC", especially the part about briding.

Upvotes: 0

Related Questions