Commit Graph

15 Commits

Author SHA1 Message Date
Thomas Van Lenten
2480acb6d9 Support ObjC Generic Collections
- Extend GPB*ObjectDictionary to support generic syntax.
- Update the generator to output generics so the enclosed type is exposed for compiler checks.
- Use generics in a the public interfaces.
- Update the generated sources that are checked in.
2016-02-18 13:55:59 -05:00
Thomas Van Lenten
ca428c1bc9 Have the tests rely on the autocreator behaviors.
Incase developers look at the tests for examples, have them rely on the
autocreators also.
2016-01-05 14:25:17 -05:00
Thomas Van Lenten
d6590d6534 Drop all use of OSSpinLock
Apple engineers have pointed out that OSSpinLocks are vulnerable to live locking
on iOS in cases of priority inversion:
. http://mjtsai.com/blog/2015/12/16/osspinlock-is-unsafe/
. https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000372.html

- Use a dispatch_semaphore_t within the extension registry.
- Use a dispatch_semaphore_t for protecting autocreation within messages.
- Drop the custom/internal GPBString class since we don't have really good
  numbers to judge the locking replacements and it isn't required. We can
  always bring it back with real data in the future.
2015-12-17 16:05:50 -05:00
Thomas Van Lenten
938ba41039 Update the min toolchain for iOS/OS X to be Xcode 7
- Let Xcode update the projects, schemes, and info.plists.
- Add workaround for shallow analyzer issues in current Xcode versions (deep analyze gets things correct).
- Tweak the Swift based tests to avoid warnings from Xcode 7's XCTest using optionals for autoenclosure results.
- No longer tag the ObjC iOS travis test as flaky, xctool seems to manage the simulator pretty well.
2015-12-10 16:40:10 -05:00
Thomas Van Lenten
c27833b632 Enable CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION for the projects. 2015-12-07 10:49:30 -05:00
Thomas Van Lenten
ad2d5c926b Support enum forward decls in Objective C++
NS_ENUM changes defintion in Objective C++ based on the C++ spec being
compiled with, special case the one situation where it wouldn't support doing a
forward decl for the enum.
2015-10-01 09:03:30 -04:00
Thomas Van Lenten
1383d53e67 Cleanups for newer Xcodes
- Move up to 8.4 as the high simulator (assuming Xcode 6.4).
- Add cast to NSMutableDictionary so clang and resolve the selector.
- Add case for the newer static analyzer so it won't trigger a false warning.
- Update the "dictionary" interface to use "object" naming. Xcode 7+ has gotten
  more strict on the use of nonnull/nullable; combining that with the generic
  collection support; and the "dictionary" classes we created now collide with
  what the generic KeyValueCoding in the system headers triggering
  warnings/errors. Fix this and hopefully all future issue by renaming the
  methods to use "object" for the classes that have data types as objects
  instead of PODs. Taking this renaming hit now while ObjC is still in beta
  because it is a breaking change for any existing code.
2015-09-29 17:18:09 -04:00
TeBoring
aca5a60883 Fix bugs for objectivec 2015-08-26 16:24:06 -07:00
Thomas Van Lenten
8c88957ef3 Add nonnil markup to ObjC library.
Add the clang annotations to the objc library and generated code to help with Swift bridging and compiler checks.
2015-06-16 17:04:50 -04:00
Thomas Van Lenten
0f2b4a0e82 Update podspec for files that can build now, rename assets to not need @ in the name. 2015-06-10 14:30:59 -04:00
Thomas Van Lenten
d846b0b059 Beta quality drop of Objective C Support.
- Add more to the ObjC dir readme.
- Merge the ExtensionField and ExtensionDescriptor to reduce overhead.
- Fix an initialization race.
- Clean up the Xcode schemes.
- Remove the class/enum filter.
- Remove some forced inline that were bloating things without proof of performance wins.
- Rename some internal types to avoid conflicts with the well know types protos.
- Drop the use of ApplyFunctions to the compiler/optimizer can do what it wants.
- Better document some possible future improvements.
- Add missing support for parsing repeated primitive fields in packed or unpacked forms.
- Improve -hash.
- Add *Count for repeated and map<> fields to avoid auto create when checking for them being set.
2015-06-08 17:17:22 -04:00
Thomas Van Lenten
58cd4a47e8 ObjC fixup for the branch.
- Shouldn't need SRCROOT in the project since Xcode should be setting the working directory to where the project lives.
- Remove the packed/unpacked repeated enum field in the tests and update the code to handle the defaults.
- Move up the ignore to cover .DS_Store files in src also.

add starstar
2015-05-26 14:01:54 -04:00
Bo Yang
50a765ba03 Fix bugs in objective-c. 2015-05-25 12:48:03 -07:00
Thomas Van Lenten
1dcc329427 Objective C Second Alpha Drop
- Style fixups in the code.
- map<> serialization fixes and more tests.
- Autocreation of map<> fields (to match repeated fields).
- @@protoc_insertion_point(global_scope|imports).
- Fixup proto2 syntax extension support.
- Move all startup code to +initialize so it happen on class usage and not app startup.
- Have generated headers use forward declarations and move imports into generated code, reduces what is need at compile time to speed up compiled and avoid pointless rippling of rebuilds.
2015-05-22 14:27:31 -04:00
Thomas Van Lenten
30650d81d9 Alpha 1 drop of Google's Objective C plugin and runtime support for protobufs. 2015-05-06 13:19:14 -04:00