Skip to content

Property named free conflicts with NSCoder call to C free(). #213

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Attempt to use wsdl2objc on http://testpruebaws.cognifit.com/CPCService?wsdl
2. Include the generated code into a project.
3. Example source can be found at 
https://github.com/gradha/wsdl2obj_google_bugs/commit/7d280c178d0a729803f5e7170f
dd3c3c2729a61b.

What is the expected output?
Compile.

What do you see instead?

Error compiler:

/Users/gradha/Desktop/wsdl2obj_google_bugs/generated_code/CPCServiceSvc.m:2416:2
6: error: called object type 'USBoolean *' is not a function or function pointer
        if (numIvars > 0) { free(ivars); }
                            ~~~~^
/Users/gradha/Desktop/wsdl2obj_google_bugs/generated_code/CPCServiceSvc.m:2433:2
6: error: called object type 'USBoolean *' is not a function or function pointer
        if (numIvars > 0) { free(ivars); }
                            ~~~~^

Conflict with line 572 of CPCServiceSvc.h
@property (nonatomic, retain) USBoolean * free;


What version of the product are you using? On what operating system?
r234.

Please provide any additional information below.

One solution to patch this is to wrap the call to free in a function call which 
doesn't have the Objective-C namespace conflict. See 
https://github.com/gradha/wsdl2obj_google_bugs/commit/73b194b2c2968a9ed70195c4a3
5c9b558b07f66d#diff-64f66518e57c20a6ed604901e0eddacdR2413.

Original issue reported on code.google.com by supergra...@gmail.com on 23 Nov 2014 at 9:17

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions